Jeremy James 2 Posted July 8, 2020 Hi All, My scenario is that when players enter a trigger a helicopter is called and lands to pick up players and then flies off the end trigger, job done, tea and medals. The landing right now is set to a timer but I want to be able to have the helicopter wait for all players on the server to board. I'm a bit of a beginner when it comes to coding but I figured that it must have something to do with the cargo of the helicopter connected to the amount of people of the mission but how to put that together in a code is beyond me. Any pointers would be happily received. Also if this is far to easy for you I apologize in advance. Regards GemStar Share this post Link to post Share on other sites
Wiki 1558 Posted July 8, 2020 In the group leader init: myfancygroup=group this; Name your chopper: myfancyhelo Put this in the trigger init: ({_x in myfancyhelo} count units myfancygroup) == (count units myfancygroup) that way, the trigger will only be activated when all the players in the group are in the chopper 3 Share this post Link to post Share on other sites
Jeremy James 2 Posted July 8, 2020 2 minutes ago, Wiki said: In the group leader init: myfancygroup=group this; Name your chopper: myfancyhelo Put this in the trigger init: ({_x in myfancyhelo} count units myfancygroup) == (count units myfancygroup) that way, the trigger will only be activated when all the players in the group are in the chopper Ohhh, thank-you, will give that a go right away,,,,thanks Share this post Link to post Share on other sites
pierremgi 4927 Posted July 8, 2020 Yep. That's for the condition. The pick up in combat environment or at sea or town... is very tricky ( you can see some topics about the pilot's behavior). Share this post Link to post Share on other sites
Jeremy James 2 Posted July 9, 2020 20 hours ago, Wiki said: In the group leader init: myfancygroup=group this; Name your chopper: myfancyhelo Put this in the trigger init: ({_x in myfancyhelo} count units myfancygroup) == (count units myfancygroup) that way, the trigger will only be activated when all the players in the group are in the chopper Yep I see how that works and Ive tried in and works fine, I actually watched pierremgi video on the same subject and all good. However, I would like it to count the players on the server. E.G. There are 4 Blufor players, individual players and not linked to a group that need to get the heli before it takes off. So the code would match the amount of Blufor players on the server to the amount in the heli and when the numbers match it takes off. Share this post Link to post Share on other sites
pierremgi 4927 Posted July 9, 2020 ({_x in yourHelo} count allPlayers == count allPlayers) && !(allPlayers isEqualTo []) the second part of the condition to avoid the trigger firing prematurely at start. Share this post Link to post Share on other sites
Leopard20 813 Posted July 9, 2020 3 hours ago, pierremgi said: ({_x in yourHelo} count allPlayers == count allPlayers) && !(allPlayers isEqualTo []) the second part of the condition to avoid the trigger firing prematurely at start. Or maybe : count list _trigger != 0 Share this post Link to post Share on other sites