Jump to content
Sign in to follow this  
panther42

Two groups in vehicle, assign range of seats

Recommended Posts

I have searched several threads regarding moveInCargo, but can't find the answer I'm looking for.

Here is the situation:

I have two groups which are placed in a helicopter. Let's call them group1 and group2.

The first group, group1, consists of the aircraft crew. For realistic purposes, I like the helicopter crew positions (pilot, co pilot, gunner, crewchief, etc) to be filled out. For whatever reasons, BIS decided not to put co pilots etc in some of the helicopters.

I make two separate groups so I can eject or tell group 2 to get out, and group1 stays with the aircraft.

I have no problems if the co pilot seat is a turret. The problem arises when trying to assign the co pilot "moveInCargo [_heli,0]". This is with the Little Bird and any other helicopter in which the co pilot seat is not a turret, and is position 0.

Group1 and group2 are spawned at the same time.

When group2 is moved in cargo via scripting, the units in group2 always fill the moveInCargo slot 0. Therefore, my co pilot always ends up on the outside of the Little Bird.

Is there a moveInCargo array to specify a range of seats group2 will occupy not knowing if the group will be 2 soldiers or 24?

Something like group2 moveInCargo [_heli,1-4], meaning they will only occupy slots 1 through 4?

I tried moving my co pilot with the moveTo action, but that didn't work, unless I placed it at the wrong point in my script.

Share this post


Link to post
Share on other sites

Yes, that was one of the first threads I had read. Unfortunately, it doesn't describe moving a group in specific cargo index.

Like, "group moveInCargo [vehicle, index 4 through 8] for example, instead of filling starting at index 0.

Maybe I missed something in that thread which you are pointing out kylania?

Share this post


Link to post
Share on other sites

You'd loop through the group members and the seats or just repeat the command for each unit.

_i = 4;
{_x moveInCargo [_heli, _i]; _i = _i + 1;} forEach units group whatever;

or something.

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  

×