Jump to content
zulu1

Unloading Group From Vehicle

Recommended Posts

I'm using this to start a group in a vehicle "_x moveincargo heli1" foreach units group this;, then I have a waypoint for the vehicle for Transport Unload, but only the leader is unloaded. I tried adding a Getout waypoint for the group at the transport unload way point and that didn't help. How do you get the entire group to unload?

Share this post


Link to post
Share on other sites

I assume you mean the player is the squad leader, as in those conditions an AI squad or a squad under an AI leader will disembark without a problem.

You can try this trigger :

Condition

!(player in heli1)

On Activation

{unassignvehicle _x} foreach units group player; {_x action ["GETOUT", heli1]} foreach units group player

This way, once the player (that is squad leader) is out of the helicopter (as the helo will always eject the squad leader first with a transport unload), the trigger will start and each AI of the squad will use the get out action.

It is possible depending on the situation of the terrain and the helo location that some AI will eject and hurt themselves.

To avoid that, instead do the following :

In the init.sqs or in the init line of any entity present at the start of the mission put :

GOGOGO=false

at the trigger that has

!(player in heli1)

at On Activation put :

GOGOGO=true

instead of the previous piece of code.

Now create a 2nd trigger, at Mix Max Mid put 3

at the line Condition, put

GOGOGO

On Activation

{unassignvehicle _x} foreach units group player; {_x action ["GETOUT", heli1]} foreach units group player

So the squad will eject 3 seconds after the player has done it, hopefully letting the helo time to finish its landing correctly.

Share this post


Link to post
Share on other sites

I think you are also referring to MP...

Always had this problem in MP...

use this command as it gets overlooked quite alot:

{_x leaveVehicle vehiclename}foreach units group player

This permanently unassigns group from vehicle however...

Edited by WW2Weasel
Additional Indo

Share this post


Link to post
Share on other sites

Are you sure about "leavevehicle".

The biki refers it as an ArmA2-only command apparently

EDIT : seems the command works in OFP.

If someone able to edit the BIS OFP scripting command wiki read this, maybe you should add leavevehicle to the BIS version too :

http://community.bistudio.com/wiki/Category:Scripting_Commands_OFP_1.96

Edited by Sanctuary

Share this post


Link to post
Share on other sites

Thanks Sancturary and Weasel, I'll try both and see what works the best.

Weasel, check your yahoo mail, I sent you some ww2 missions.

Edited by Zulu1

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

×