Jump to content
Sign in to follow this  
frezinator

How to force eject all players out of the aircraft by using trigger?

Recommended Posts

How do you force eject all players out of the aircraft by using a trigger?

For example: im using a MV-22 plane and set a waypoint called "move" somewhere on the map. Then I put a trigger before the waypoint "move". Then when the MV-22 plane is inside the trigger, all players will be forced to eject, or paradrop.

It's like an automatic paradrop. I don't what to put in the trigger to make this work..

Share this post


Link to post
Share on other sites

I really don't like to stuff complex code into the activation field of a trigger, but meh, here you have one possible solution:

{if (_x isKindOf "Air") then {while {count (crew _x) > 0} do { ((crew _x) select 0) action ["eject", _x];};};} forEach thisList;

The rest of the trigger's configuration is up to you :)

Share this post


Link to post
Share on other sites

I dont think he wants the crew to bail out.

{_x action ["eject", plane]} foreach grupp;

plane is the name of the aircraft and grupp is the name of the group.

Share this post


Link to post
Share on other sites
I really don't like to stuff complex code into the activation field of a trigger, but meh, here you have one possible solution:

{if (_x isKindOf "Air") then {while {count (crew _x) > 0} do { ((crew _x) select 0) action ["eject", _x];};};} forEach thisList;

The rest of the trigger's configuration is up to you :)

it works!!! but the pilots ejects too >.< then the plane crash lol. How do you prevent the pilot from ejecting?

---------- Post added at 07:14 ---------- Previous post was at 07:13 ----------

I dont think he wants the crew to bail out.

plane is the name of the aircraft and grupp is the name of the group.

I want everyone to be forced to eject out of the plane except the pilot.

---------- Post added at 07:15 ---------- Previous post was at 07:14 ----------

{

if (isPlayer _x) then {

_x action ["eject", _mv22veh];

};

} forEach (crew _mv22veh);

How do you prevent pilot from ejecting?

Share this post


Link to post
Share on other sites

How do you prevent pilot from ejecting?

My first example would eject everyone but AI assuming AI is piloting. To leave pilot in place no matter who is piloting

{

if (_x != driver _mv22veh) then {

_x action ["eject", _mv22veh];

};

} forEach (crew _mv22veh);

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  

×