Shided 0 Posted October 2 So I have a problem with my helis/planes that whenever someone goes unconscious/is dead in one or one explodes you can't respawn and you either need the zeus to delete you or someone else pull you out of the vehicle. I have made this script so far but it doesn't seem to properly work. { if ( _X getVariable ["ACE_isUnconscious", false]) or (!alive _x) then {moveOut _x} } foreach crew _vehicle This seems to simply move the unconscious guy out of the vehicle even if he is the only one unconscious there. How would I make it so anyone who is unconscious gets moved out of the thing only when everyone else in the vehicle is also unconscious? Thank you in advance Share this post Link to post Share on other sites
Schatten 287 Posted October 2 Try this code: _hasAliveCrew = ((crew _vehicle) findIf { !(alive _x) or { _x getVariable ["ACE_isUnconscious", false] } }) < 0; if (_hasAliveCrew) exitWith { }; { _x moveOut _vehicle; } forEach (crew _vehicle); 2 Share this post Link to post Share on other sites
Shided 0 Posted October 2 Thank you, I played with with it more on my own, I will see if yours works cause it seems to be much shorter than what I came up with! Any idea how would I also apply this just for players? Realized that if players died in a heli with an alive ai besides them this doesn't trigger which can create problems. Share this post Link to post Share on other sites
Schatten 287 Posted October 2 You can use isPlayer to check crew members. Share this post Link to post Share on other sites