{"name":"getObjectTextures","title":"getObjectTextures","type":"command","url":"https://community.bistudio.com/wiki/getObjectTextures","revid":370025,"updated":"2024-10-27T20:33:06Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","locality":{"argument":"global"},"description":"Gets all custom textures (hiddenSelectionsTextures) associated with the object.\n\n> [!IMPORTANT]\n> Prior to Arma 3 v2.20 it will return an empty Array when executed on simple objects.","syntaxes":[{"syntax":"getObjectTextures obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"array of textures"},"form":"unary","right":{"text":"obj"}},{"syntax":"obj getObjectTextures sels","since":"arma3 2.20","params":[{"name":"obj","type":"Object","description":"entity","type_expr":"Object"},{"name":"sels","type":"Array","description":"array of index(es) and/or selection(s). If array is empty [] - default object textures are returned (see example 3)","type_expr":"Array"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"array of textures in order of 'sels'. Non existing textures filled with nils."},"form":"binary","left":{"text":"obj"},"right":{"text":"sels"}}],"examples":[{"code":["_textures = getObjectTextures player;"]},{"text":"```sqf\nplayer setObjectTexture [\"clan\", \"\\a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\"];\nplayer getObjectTextures [\"clan\", 1, 0, player, \"dskjhkjhsad\"];\n// [\"a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\",\"\",\"a3\\characters_f\\blufor\\data\\clothing1_co.paa\",<null>,<null>]\n```","code":["player setObjectTexture [\"clan\", \"\\a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\"];\nplayer getObjectTextures [\"clan\", 1, 0, player, \"dskjhkjhsad\"]; \n// [\"a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\",\"\",\"a3\\characters_f\\blufor\\data\\clothing1_co.paa\",<null>,<null>]"]},{"code":["player setObjectTexture [0, \"\"];\nplayer getObjectTextures []; // [\"a3\\characters_f\\blufor\\data\\clothing1_co.paa\",\"\"]"]}],"see_also":["setObjectTexture","setObjectTextureGlobal","getObjectMaterials","setObjectMaterial","setObjectMaterialGlobal","getModelInfo"]}