Jump to content
Sign in to follow this  
TBowen

Weapons defined in config.cpp not having attachments

Recommended Posts

class CfgWeapons
{
    class UK3CB_BAF_L85A3;
    class 51X_A3_SFFH_LLM_LDS_GRIP: UK3CB_BAF_L85A3
    {
        scope = 2;
        class LinkedItems
        {
            class LinkedItemsOptic
            {
                slot = "CowsSlot";
                item = "RKSL_optic_LDS";
            };
            class LinkedItemAcc
            {
                slot = "PointerSlot";
                item = "UK3CB_BAF_LLM_IR_Tan";
            };
            class LinkedItemsMuzzle
            {
                slot = "MuzzleSlot";
                item = "UK3CB_BAF_SFFH";
            };
            class LinkedItemsUnder
            {
                slot = "UnderBarrelSlot";
                item = "UK3CB_underbarrel_acc_grippod";
            };
        };
    };
};

is what i'm using but the unit spawns in with a L85A3 without attachments.

private _config = configFile >> "CfgWeapons" >> "51X_A3_SFFH_LLM_LDS_GRIP"; 
 
private _atachments = "true" configClasses (_config >> "LinkedItems") apply { 
 
getText (_x >> "item") 
 
}; 
 
player addWeapon configName _config; 
 
{ 
 
player addPrimaryWeaponItem _x 
 
} forEach _atachments;

when i do that it gives me an L85A3 with all the correct attachments.

 

Any ideas as to why this is not working?

Share this post


Link to post
Share on other sites

Not really sure, but had some problems with my config as well lately. Are you using CUP weapons by chance?

Share this post


Link to post
Share on other sites

Try adding

	baseweapon="UK3CB_BAF_L85A3";

to the 51X_A3_SFFH_LLM_LDS_GRIP class define.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×