bumyplum 10 Posted March 12, 2019 So if you have retextured a vehicle for example using setobjecttextureglobal, how would i find/set the textures back to their default ones? Share this post Link to post Share on other sites
POLPOX 779 Posted March 12, 2019 getArray (configFile >> "CfgVehicles" >> typeOf _vehicle >> "hiddenSelectionsTextures") Share this post Link to post Share on other sites
bumyplum 10 Posted March 12, 2019 26 minutes ago, POLPOX said: getArray (configFile >> "CfgVehicles" >> typeOf _vehicle >> "hiddenSelectionsTextures") _Tex = getArray (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "hiddenSelectionsTextures"); _TexN = count _Tex; for "_I" from 1 to _TexN do { format["_Tex%1 = _Tex # %1;",_I]; vehicle player setObjectTextureGlobal [format[%1,_Tex%1],_I]; }; Can Someone explain to me what I'm doing wrong? Share this post Link to post Share on other sites
Dedmen 2716 Posted March 12, 2019 10 minutes ago, bumyplum said: _Tex = getArray (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "hiddenSelectionsTextures"); _TexN = count _Tex; for "_I" from 1 to _TexN do { format["_Tex%1 = _Tex # %1;",_I]; vehicle player setObjectTextureGlobal [format[%1,_Tex%1],_I]; }; Can Someone explain to me what I'm doing wrong? I don't even know what that code is supposed to be... Why are you using a for from to loop? Why is there a format that doesn't do anything. Why does the second format not have a string? that's a syntax error. why are you using uppercase i? so many questions. private _textures = getArray (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "hiddenSelectionsTextures"); { (vehicle player) setObjectTextureGlobal [_x, _forEachIndex]; } forEach _textures; Share this post Link to post Share on other sites
bumyplum 10 Posted March 12, 2019 @Dedmen _Tex = getArray (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "hiddenSelectionsTextures"); // Get the textures _TexN = count _Tex; for "_i" from 0 to _TexN do // Repeat for how many textures { _Tex = getArray (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "hiddenSelectionsTextures"); abc = format["_Tex%1 = _Tex # %1;",_i]; // Setting _Tex%1 To the number of textures vehicle player setObjectTextureGlobal [format[abc,_Tex%1],_i]; // set the textures }; I'm trying to set the textures of a vehicle to the default ones Share this post Link to post Share on other sites
POLPOX 779 Posted March 12, 2019 { _vehicle setObjectTextureGlobal [_forEachIndex,_x] ; } forEach getArray (configFile >> "CfgVehicles" >> typeOf _vehicle >> "hiddenSelectionsTextures") ; Share this post Link to post Share on other sites