Custom Skin Array - Is It Possible?

delta123

New Member
Hi all,

Recently took on a project and just seeing if this is possible and if i am doing this right or would it even work?
So the base class is SkinConfig but instead of going through every other skin and duplicating the same data over and over again i just want the SkinConfig to hand all the default stuff and then in the other classes i can define things individually in there.

If i use this code would it work - using the Goto function?

If anyone can help would be much appreciated.

Code:
 SkinConfig =
{
        SkinConfig:
        side = 1;
        scope = 2;
        canCarryBackpack = 1;
        canHideBodies = true;
        weapons[] = {"Throw","Put"};
        magazines[] = {};
        respawnWeapons[] = {"Throw","Put"};
        respawnMagazines[] = {};
        backpack = "";
        attendant = false;      //heal players
        transportFuel = 0;      //refuel
        transportRepair = 0;    //repair     
        weaponSlots = "1         +      4        + 12*          256      + 2*   4096     +      2        + 8*   16  +                    12*131072";
        return;
};
class Survivor2_DZ : Soldier_Crew_PMC
{
                Goto SkinConfig;
                displayName = $STR_CHAR_1;
                model = "\zero\characters\man_survivor";
};
 
How the classes work is by inheriting the values of a base class.
You can see this in CfgArma.hpp which is where I assume you are working anyways.

This is the base:
Code:
                class Default {
                        sex = "male";
                        playerModel = "Survivor2_DZ";
                };

Then this skin is using the class Default as its base class:
Code:
                class Skin_Survivor2_DZ: Default {
                        sex = "male";
                        playerModel = "Survivor2_DZ";
                };

So you should be able to make a skinbase like you said, and then call it as a base to inherit it's values.
 
Back
Top