Jump to content
Sign in to follow this  
xoo

adding custom cargo to multiple vehicles

Recommended Posts

My wish:

landVehicle addItemCargo ["ToolKit",1];

But addItemCargo only works for objects, not for classes.

Any ideas ?

Share this post


Link to post
Share on other sites

i can't find any way to list all vehicles and parse them recursively in order to assign custom cargo for each.

Share this post


Link to post
Share on other sites

try this:

{_x addItemCargo ["ToolKit",1];} forEach vehicles;

"vehicles" will return an array of all vehicles in the mission, and for every one of them which is presented as "_x" will add toolkit to cargo

Share this post


Link to post
Share on other sites

Exactly what i'm looking for !! thx a lot.

It's really hard to find SQF tutorials who explain the usual needs of developers, and not only the basics.

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  

×