Jump to content
Sign in to follow this  
logan83

Adding a optic to a rifle in unit Config.cpp??

Recommended Posts

Hi to all this is my unit reesking config

       class BT_Heavy_Leader: BT_BDU_Cuadros_Base {
       scope = 2;
       author = "Logan83";
       displayName = "Coordinador de Operaciones";
       icon = "iconManLeader";
       detectSkill = 40;
       nakedUniform = "U_BT_BASE_BasicBody";
       uniformClass = "U_BT_BDU_TAN_2";
       hiddenSelections[] = {"Camo"};
       hiddenSelectionsTextures[] = {"\LG83_BT\textures\Uniforms\U_BT_BDU_TAN_2.paa"};
       [color="#FF0000"]Items[] = {"optic_MRCO"};
       RespawnItems[] = {"optic_MRCO"};[/color]
       weapons[] = {"arifle_mas_ak_74m_sf","hgun_mas_acp_F","Throw","Put","Binocular"};
       respawnWeapons[] = {"arifle_mas_ak_74m_sf","hgun_mas_acp_F","Throw","Put","Binocular"};
       magazines[] = {"30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_T_mag","12Rnd_mas_45acp_Mag","12Rnd_mas_45acp_Mag","12Rnd_mas_45acp_Mag","SmokeShell","SmokeShellRed","SmokeShellGreen","HandGrenade","I_IR_Grenade"};
       respawnMagazines[] = {"30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_mag","30Rnd_mas_545x39_T_mag","12Rnd_mas_45acp_Mag","12Rnd_mas_45acp_Mag","12Rnd_mas_45acp_Mag","SmokeShell","SmokeShellRed","SmokeShellGreen","HandGrenade","I_IR_Grenade"};
       linkeditems[] = {"optic_MRCO","H_BT_Cap_headphones_Brn","V_BT_Vest_Marpat_Battle","NVGoggles_mas","G_Aviator","ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS"};
       respawnlinkeditems[] = {"optic_MRCO","H_BT_Cap_headphones_Brn","V_BT_Vest_Marpat_Battle","NVGoggles_mas","G_Aviator","ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS"};
     };

using the lines Items[] = {"optic_MRCO"}; and RespawnItems[] = {"optic_MRCO"};" i put that optic in the units gear, but i want to put the optic in the unit weapon directly. How can do this? thanks

Share this post


Link to post
Share on other sites

You'd create a separate class for the weapon under cfgWeapons and define it there.

Example:

	class m249_eot_laser : m249
{
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "RH_eotech553";
		};

		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "RH_peq15";
		};
	};
};

Share this post


Link to post
Share on other sites

I know this is an old thread but I am wondering what I am doing wrong. I get a no entry ".model" error.

class 20thSFG_ARCO_IR_M4A1GL_2_laser;
class TF_M4A1GL : 20thSFG_ARCO_IR_M4A1GL_2_laser
{
	class LinkedItems
	{
		class LinkedItemsOptic
		{
			slot = "CowsSlot";
			item = "optic_Arco";
		};

		class LinkedItemsAcc
		{
			slot = "PointerSlot";
			item = "acc_pointer_IR";
		};

		class LinkedItemsMuzzle
		{
			slot = "MuzzleSlot";
			item = "muzzle_snds_M";
		};
	};
};

Character Class

class 20thSFG_OCP_Soldier_SL_F: B_Soldier_base_F
{
	_generalMacro = "B_Soldier_F";
	scope = 2;
	displayName = "Task Force 2031 OCP Squad Leader";
	nakedUniform = "U_BasicBody";
	uniformClass = "20thSFG_OCP_CombatUniform_mcam";
	hiddenSelections[] = {"Camo","Insignia"};
	hiddenSelectionsTextures[] = {"\20thSFG_Mod\data\textures\20thSFG_c_mcam.paa"};
	linkedItems[] = {"20thSFG_OCP_PlateCarrier1_rgr","20thSFG_fast_ocp","NVGoggles","ItemMap","ItemCompass","ItemWatch","ItemRadio"};
	respawnLinkedItems[] = {"20thSFG_OCP_PlateCarrier1_rgr","20thSFG_fast_ocp","NVGoggles","ItemMap","ItemCompass","ItemWatch","ItemRadio"};
        weapons[] = {"20thSFG_ARCO_IR_M4A1GL_2_laser","Throw","Put"};
	respawnWeapons[] = {"20thSFG_ARCO_IR_M4A1GL_2_laser","Throw","Put"};
	magazines[] = {"m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","1RndHEDP","1RndHEDP","1RndHEDP","1RndHEDP","1RndHEDP","1RndHEDP","1RndHEDP"};
	respawnMagazines[] = {"m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","m4262_mag","1RndHEDP","1RndHEDP","1RndHEDP","1RndHEDP","1RndHEDP","1RndHEDP","1RndHEDP"};

Share this post


Link to post
Share on other sites

I'd say there is no model defined for your weapon. You can confirm this by checking the 20thSFG_ARCO_IR_M4A1GL_2_laser class in the config viewer in the game (since you inherit the TF_M4A1GL class from it while not defining a model in TF_M4A1GL itself).

Share this post


Link to post
Share on other sites

It was defined, I ended up figuring the issue out, it actually had to do with a magazine classname not the rifle at all.

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  

×