Arma 3 Scripting

Arma 3: Setting Textures for Wrecks

  • Also known as Arma 3 Setting Textures for Wrecks

Topic · Markdown · JSON · original wiki page

Eden Update comes with a new functionality allowing setting of hiddenSelections textures (skins) even for wrecks of vehicles. This allows content creators to have the same texture used for both main model and the wreck when they want to switch different texture options.

Setting up the model

Model for the wreck with changeable skins needs to have two things done in order to work correctly:

class Heli_Light_01_wreck_F : Default
{
    sections[] = { "camo1" };
};

Setting up in config

Things go a bit harder with the config of the wreck proxy as it needs to be properly defined in cfgNonAIVehicles:

class CfgNonAIVehicles
{
    class ProxyRetex;
    class ProxyHeli_Light_01_wreck_F : ProxyRetex
    {
        hiddenSelections[] = { "camo1" };
        model = "\A3\Air_F\Heli_Light_01\Heli_Light_01_wreck_F.p3d";
    };
};

Actual use of the technology in game

This is actually the easiest part - once the wreck model is properly defined, changing textures for the main model (both via hiddenSelectionsTextures in config and setObjectTexture / setObjectTextureGlobal via script should work even for the wreck). Easy as that ;-)