Jump to content
Sign in to follow this  
BadHabitz

TransportWeapons in CfgVehicles issue

Recommended Posts

Does 'transportWeapons' work in CfgVehicles? I'm trying to get a weapon to populate as an item in a backpack in my config.cpp

As it stands now I just get the empty ghost object when I run it. When I remove the "_xx_" I get that same ghost object but then with an error.

http://community.bistudio.com/wiki/CfgVehicles_Config_Reference#TransportWeapons_Class doesn't help me at all. I know that TransportMagazines and TransportItems work, so I thought naturally TransportWeapons would work too. I've been able to put a weapon in a backpack through a *.sqf in the INIT field of a unit, but I want to get this to work on a unit in the editor with a backpack assigned.

Any help would be appreciated.

		class TransportWeapons {

		class _xx_shotgun_a {
			name = "shotgun_a";
			count = 1;
		};
	};

Share this post


Link to post
Share on other sites

here u go..

_unit addItemCargo ["FirstAidKit",100]; //adds item to cargo.
_unit addMagazineCargo ["9Rnd_45ACP_Mag", 50]; //adds magazine to cargo.
_unit addBackpackCargo ["B_UAV_01_backpack_F",1]; //adds backpack to cargo.
_unit addWeaponCargo ["launch_B_Titan_short_F", 1]; //adds weapen to cargo.

Share this post


Link to post
Share on other sites
Might wanna ask over here. They do a lot more config stuff then we do. :)
Thanks. Messed up. Moved. Edited by BadHabitz
moved sections

Share this post


Link to post
Share on other sites

Try this.

class TransportWeapons {

		class _xx_shotgun_a {
			weapon = "shotgun_a";
			count = 1;
		};
	};

Share this post


Link to post
Share on other sites
Try this.

class TransportWeapons {

		class _xx_shotgun_a {
			weapon = "shotgun_a";
			count = 1;
		};
	};

Genius! It works. At first I had to do a double take, because it looked just like the code I presented. Thanks a ton!

Share this post


Link to post
Share on other sites
Try this.

class TransportWeapons {

		class _xx_shotgun_a {
			weapon = "shotgun_a";
			count = 1;
		};
	};

Thank you for saving my sanity. I've been trying to figure out for four days why my extra 5Rnd_127x108_Mag ammo would appear in my custom backpack, but not the srifle_GM6_F. All I was missing from my class TransportWeapons was weapon = "srifle_GM6_F" then it worked. You sir deserve a beer.

Edited by takealready
typo

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  

×