{"name":"getObjectTextures","operator":null,"title":"getObjectTextures","type":"command","url":"https://community.bistudio.com/wiki/getObjectTextures","revid":370025,"updated":"2024-10-27T20:33:06Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.38"}],"since":{"game":"arma3","name":"Arma 3","version":"1.38"},"arma3_since":"1.38","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"obj","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"obj: Object"}],"returns":{"type":"Array of Strings","types":["Array","String"],"description":"array of textures","text":"Array of Strings - array of textures"},"form":"unary","operator":null,"left":null,"right":{"text":"obj","types":["Object"]}},{"syntax":"obj getObjectTextures sels","since":"Arma3 2.20","effect":null,"exec":null,"params":[{"name":"obj","type":"Object","optional":false,"default":null,"description":"entity","types":["Object"],"since":null,"text":"obj: Object - entity"},{"name":"sels","type":"Array","optional":false,"default":null,"description":"array of index(es) and/or selection(s). If array is empty [] - default object textures are returned (see example 3)","types":["Array"],"since":null,"text":"sels: Array - array of index(es) and/or selection(s). If array is empty [] - default object textures are returned (see example 3)"}],"returns":{"type":"Array of Strings","types":["Array","String"],"description":"array of textures in order of 'sels'. Non existing textures filled with nils.","text":"Array of Strings - array of textures in order of 'sels'. Non existing textures filled with nils."},"form":"binary","operator":null,"left":{"text":"obj","types":["Object"]},"right":{"text":"sels","types":["Array"]}}],"examples":[{"text":"```sqf\n_textures = getObjectTextures player;\n```","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>]"]},{"text":"```sqf\nplayer setObjectTexture [0, \"\"];\nplayer getObjectTextures []; // [\"a3\\characters_f\\blufor\\data\\clothing1_co.paa\",\"\"]\n```","code":["player setObjectTexture [0, \"\"];\nplayer getObjectTextures []; // [\"a3\\characters_f\\blufor\\data\\clothing1_co.paa\",\"\"]"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setObjectTexture","setObjectTextureGlobal","getObjectMaterials","setObjectMaterial","setObjectMaterialGlobal","getModelInfo"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 1.38","Scripting Commands"]}