Jump to content
Sign in to follow this  
lucilk

need help with an array

Recommended Posts

so i have a group of 3 civilians.

//i will extract the leader....
_civ = _this select 0;

//i found the group
_civgroup = group _civ;


//and the vehicle he is in
_civvehicle = vehicle _civ;

ok, they are out of the vehicle and waiting, all i need is to get them back inside in this order:

leader on driver seat, and all other group members in cargo seats.

so i say this:

_civ assignAsdriver _civvehicle;

_cargounits = ((units _civgroup) - (leader _civgroup));

{_x assignAsCargo _civvehicle} forEach _cargounits;

{[_x] orderGetIn true} forEach _cargounits;

the problem is that i cant get the units exept leader from _cargounits.

Any ideas?

Thanks

Share this post


Link to post
Share on other sites

_civ assignAsdriver _civvehicle; 

_cargounits = ((units _civgroup) - [b][size="4"][[/size][/b]leader _civgroup[b][size="4"]][/size][/b]); 

{_x assignAsCargo _civvehicle} forEach _cargounits; 

{[_x] orderGetIn true} forEach _cargounits; 

To get correct _cargounits value you need brackets around leader _civgroup. Try that. :)

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  

×