Jump to content
Sign in to follow this  
Sabre=TE=

Group in vehicle

Recommended Posts

I'm trying to develop a mission which has a group of civilians in a truck, which I have achieved through the {_x move InCargo truck1} for Each Units Group this command, however I don't want them to occupy the driver position and front seats - just the rear seats.

Any suggestions

Share this post


Link to post
Share on other sites

It there were two vacant seats in the front po would start with a value of two. I don't think they do go in the drivers seat.

po=2;{ _x moveincargo [truck1,po];po=po+1} forEach units grp

I wouldn't name your group "group"

Edited by F2k Sel

Share this post


Link to post
Share on other sites

put this into the init line of the leader of the group:

_i=1; {_i=_i+1;_x moveInCargo [lw,_i]} forEach units this

set _i=2, if you have two passenger seats next to the driver. So the seating will start at position 3. lw is the name of the truck. you can replace this by the name of the group, if you call it from somewhere else.

I used this for a platoon, where the commander is in front with the driver, therefore I started with _i=1

Share this post


Link to post
Share on other sites

Thanks for the replies guys. I've tried both and I can't get them to work. I must be missing something. I'm quite new to mission making as yuo might have guessed. Both methods get the same result, the civilians are in the truck but they are occupying all three front seats including the drivers seat and the rest of them are in the back.

Any ideas?

Share this post


Link to post
Share on other sites

I noticed you named your truck truck1 I only had it named as truck (now updated) also make a real group by putting this in the leaders init grp=group this

Then just copy and past the code.

_po=2;{ _x moveincargo [truck1,_po];_po=_po+1} forEach units grp

I've also added an undersore to make it local.

I can't make it do as you describe.

Share this post


Link to post
Share on other sites
I noticed you named your truck truck1 I only had it named as truck (now updated) also make a real group by putting this in the leaders init grp=group this

Then just copy and past the code.

_po=2;{ _x moveincargo [truck1,_po];_po=_po+1} forEach units grp

I've also added an undersore to make it local.

I can't make it do as you describe.

Thanks for the quick response. I've done as advised and it works partly. The two front passenger seats are now empty but I still have a civilian in the drivers seat.

Ignore all that works now, the idiot with the keyboard wasn't putting an empty vehicle on the map :o :o works now sorry :j:

Edited by Sabre=TE=
Lack of brains

Share this post


Link to post
Share on other sites

You need to place an empty truck, look under empty cars.

Share this post


Link to post
Share on other sites
You need to place an empty truck, look under empty cars.

Yeah thanks for your help, really appreciate it. Works a treat now :yay:

Regards Sabre

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  

×