FunnyCookieEver 1 Posted April 27, 2019 As the title says, I want to check if all alive players are in the helicopter. Simple evacuation but i don't know how to make helicopter stay on the ground until all players are inside. I figured out, that setting fuel to 0 will make it stay on the ground but how to set it back to 1 when all player are inside? If there is any other way to do it I would be glad to know about it. Share this post Link to post Share on other sites
stanhope 409 Posted April 27, 2019 [] spawn { heli setFuel 0; private _go = false; while {!_go} do { _go = true; { if (alive _x && !(_x in heli)) exitWith {_go = false;}; } forEach allPlayers; sleep 1; }; heli setFuel 1; }; There are undoubtedly better ways of coding this but this should work. Untested though. 1 Share this post Link to post Share on other sites
joostsidy 682 Posted June 3, 2019 waitUntil {sleep 1; {alive _x} count allPlayers == {_x in _helo} count allPlayers}; _helo doMove (getPos myTarget); I like this (untested) solution. You could put the condition ({alive _x} count allPlayers == {_x in _helo} count allPlayers) in a trigger or waypoint as well if you don't want to script too much. I noticed this is a little older post, but you might still find the solution useful for this or something else. There is also a special scripting section on the forum that you might find useful. 1 Share this post Link to post Share on other sites
Dedmen 2588 Posted June 4, 2019 20 hours ago, joostsidy said: waitUntil {sleep 1; {alive _x} count allPlayers == {_x in _helo} count allPlayers}; -> Here! Have a more efficient version. waitUntil {sleep 1; allPlayers findIf {alive _x && !(_x in _helo)} == -1}; Finds the first player who is alive but not in the helo, if no player was found who is alive and outside the helo (== -1) return true to the waitUntil and continue the script. 2 2 Share this post Link to post Share on other sites