Jump to content
Sign in to follow this  
zeeb

Need help with Respawn Loadouts

Recommended Posts

Hey guys, this will be my first post on this forum.
I've recently starting to go deeper into the editor and that involves scripting.

I have set the MP mission to respawn on selected area with the player given the ability to choose loadout.
The problem is that I can't define in the loadouts where the items should go, so on some loadouts not all items are included, or put into inventories I dont want them to be. (First Aid Kit's in the vest instead of uniform etc)

Maybe someone here knows how I can fix it, heres my script:
Loadout.cpp
 

class CfgRoles
{
	class Assault
	{
		displayName = $STR_A3_Role_Assault;
		icon = "a3\Ui_f\data\GUI\Cfg\RespawnRoles\assault_ca.paa";
	};
	class Support
	{
		displayName = $STR_A3_Role_Support;
		icon = "a3\Ui_f\data\GUI\Cfg\RespawnRoles\support_ca.paa";
	};
	class Recon
	{
		displayName = $STR_A3_Role_Recon;
		icon = "a3\Ui_f\data\GUI\Cfg\RespawnRoles\recon_ca.paa";
	};
};

class CfgRespawnInventory
{
    class WEST1
    {
        displayName = "Rifleman"; // Name visible in the menu
		icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa"; // Icon displayed next to the name (private, corporal, sergeant, lieutenant, captain, major, colonel, general)
		role = "Assault";
 
        // Loadout definition, uses same entries as CfgVehicles classes
        weapons[] = {
            "arifle_MX_F",
			"hgun_P07_F",
            "Binocular"
        };
        magazines[] = {
            "16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
            "30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag_Tracer",
			"30Rnd_65x39_caseless_mag_Tracer",
			"30Rnd_65x39_caseless_mag_Tracer",
			"30Rnd_65x39_caseless_mag_Tracer",
			"30Rnd_65x39_caseless_mag_Tracer",
			"MiniGrenade",
			"MiniGrenade",
			"MiniGrenade",
			"MiniGrenade",
			"SmokeShell",
			"SmokeShell",
			"SmokeShell",
			"SmokeShell"
        };	
        items[] = {
            "FirstAidKit",
			"FirstAidKit"
        };
        linkedItems[] = {
            "V_PlateCarrier2_rgr",
            "H_HelmetSpecB",
			"G_Combat",
            "optic_Holosight",
            "acc_pointer_IR",
			"ItemMap",
			"ItemCompass",
			"ItemWatch",
			"ItemRadio",
			"ItemGPS",
			"NVGoggles"
        };
        uniformClass = "U_B_CombatUniform_mcam";
        //backpack = "";
	};
	
	class WEST2
    {
        displayName = "Medic"; // Name visible in the menu
		icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa"; // Icon displayed next to the name (private, corporal, sergeant, lieutenant, captain, major, colonel, general)
		role = "Support";
 
        // Loadout definition, uses same entries as CfgVehicles classes
        weapons[] = {
            "arifle_MXC_F",
			"hgun_P07_F",
            "Binocular"
        };
        magazines[] = {
            "16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
            "30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag",
			"30Rnd_65x39_caseless_mag_Tracer",
			"30Rnd_65x39_caseless_mag_Tracer",
			"30Rnd_65x39_caseless_mag_Tracer",
			"30Rnd_65x39_caseless_mag_Tracer",
			"30Rnd_65x39_caseless_mag_Tracer",
			"MiniGrenade",
			"MiniGrenade",
			"SmokeShell",
			"SmokeShell",
			"SmokeShell",
			"SmokeShell",
			"SmokeShell",
			"SmokeShell",
			"SmokeShell"
        };
        items[] = {
            "FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"FirstAidKit",
			"Medikit"
        };
        linkedItems[] = {
            "V_PlateCarrier1_rgr",
            "H_HelmetB",
			"G_Bandanna_khk",
            "acc_pointer_IR",
			"ItemMap",
			"ItemCompass",
			"ItemWatch",
			"ItemRadio",
			"ItemGPS",
			"NVGoggles"
        };
        uniformClass = "U_B_CombatUniform_mcam_tshirt";
        backpack = "B_AssaultPack_rgr";
	};
	
    class WEST3
    {
        displayName = "LMG"; // Name visible in the menu
		icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa"; // Icon displayed next to the name (private, corporal, sergeant, lieutenant, captain, major, colonel, general)
		role = "Assault";
 
        // Loadout definition, uses same entries as CfgVehicles classes
        weapons[] = {
            "arifle_MX_SW_F",
			"hgun_P07_F",
            "Binocular"
        };
        magazines[] = {
            "16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
			"16Rnd_9x21_Mag",
            "100Rnd_65x39_caseless_mag",
			"100Rnd_65x39_caseless_mag",
			"100Rnd_65x39_caseless_mag",
			"100Rnd_65x39_caseless_mag_Tracer",
			"100Rnd_65x39_caseless_mag_Tracer",
			"MiniGrenade",
			"MiniGrenade",
			"MiniGrenade",
			"MiniGrenade",
			"SmokeShell",
			"SmokeShell",
			"SmokeShell",
			"SmokeShell"
        };
        items[] = {
            "FirstAidKit",
			"FirstAidKit"
        };
        linkedItems[] = {
            "V_PlateCarrier2_rgr",
            "H_HelmetSpecB",
			"G_Combat",
            "optic_Holosight",
            "acc_pointer_IR",
			"ItemMap",
			"ItemCompass",
			"ItemWatch",
			"ItemRadio",
			"ItemGPS",
			"NVGoggles"
        };
        uniformClass = "U_B_CombatUniform_mcam";
        //backpack = "";
	};
};

WEST3 does not work while the others do (I also have WEST4 that doesn't work but I didn't feel the need to include it)
It put the items randomly, First Aid Kits in the Vest while excluding magazines since it tries to add them to the uniform when there is not enough space.

Is there a way for me to use this function while also having the ability to choose where I want the items to be put? Instead of having the game trying to put the objects in place.
(I like it organized so I usually go Medics + Secondary Ammo in Uniform and Grenades + Primary Ammo in the Vest)


Thank you for your time, Zeeb.

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  

×