Jump to content
Sign in to follow this  
Hotfixx

I believe my code is correct, but it isn't working? Storing an object in a variable.

Recommended Posts

The syntax for your addXCargo commands was incorrect.

 

Here is a tweaked copy

 

"BlackhawkWreck" createVehicle getMarkerPos "heliCrash2";
_heliCrashLoot2 = "DSR_Object_Storage_Large" createVehicle (getMarkerPos "heliCrash2");
"ModuleEffectsSmoke_F" createUnit [getMarkerPos "heliCrash2",(createGroup [sideLogic,false])];
{
	_heliCrashLoot2 addMagazineCargo _x;
} forEach [
	["rhs_rpg7_PG7VL_mag",3],
	["Exile_Item_InstaDoc",6],
	["rhs_10Rnd_762x54mmR_7N1",3]
];
{
	_heliCrashLoot2 addWeaponCargo _x;
} forEach [
	["rhs_weap_rpg7",1],
	["rhs_weap_svdp",1]
];

 

I'm assuming "BlackhawkWreck" is the classname of the wrecked prop/vehicle you are using.

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  

×