Zjajo 9 Posted January 18, 2020 I have a mission for 1-5 players of which enableAI has been disabled so the only Blufor on the map are actual players. For mission completion, I want to make it so that all of the players need to be within the trigger area and be onboard a helicopter. So, basically: playableUnits in thisList && playableUnits vehicle player != player .....but obviously this snippet wont work. I need help making it work. This is the code I have in the trigger condition right now but it does not fit the requirement I would like and does not trigger the completion of this task/mission. (!alive satPhone) && {_x in thisList} count (playableUnits) == {alive _x} count (playableUnits) && vehicle player != player satPhone being an object that is deleted for multiple reasons, including task progression. Any help would be appreciated! Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted January 18, 2020 1 hour ago, Zjajo said: For mission completion, I want to make it so that all of the players need to be within the trigger area and be onboard a helicopter. Could be something like this: _check = !alive satPhone AND (count (allPlayers select {alive _x and _x inArea YourTrigger}) isEqualTo count allPlayers AND count (crew YourChopper arrayIntersect allPlayers) isEqualTo count allPlayers); Cheers Share this post Link to post Share on other sites
Larrow 2822 Posted January 18, 2020 Or.. Is the helo present in the editor? Set the helo as triggers owner( RClick trigger > connect > set trigger owner, select helo ). Or is it spawned during the mission? see triggerAttachVehicle . Then set triggers activation to present and condition to... !alive satPhone && { this } && { allPlayers select{ alive _x && { _x in triggerAttachedVehicle thisTrigger } } isEqualTo ( allPlayers select{ alive _x } ) } No need to check if the each player is in the trigger, if the helo is in the trigger and the players are in the helo, then the players must be in the trigger. 1 Share this post Link to post Share on other sites
Zjajo 9 Posted January 18, 2020 Thanks. I should have mentioned, as you suggested Larrow, that the chopper is spawned in with pilot and co-pilot once the satPhone is deleted. The chopper then makes way from approx 3km out to the marker location for extraction. I will have to play around and see how I can attach the trigger to the spawned in chopper. Grumpy, would the arrayIntersect have to be a one-for-one check? If I understand it correctly, it would check that array1 is equal to array2, but would the spawned in pilot and co-pilot make the check return false? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted January 18, 2020 1 hour ago, Zjajo said: Grumpy, would the arrayIntersect have to be a one-for-one check? If I understand it correctly, it would check that array1 is equal to array2, but would the spawned in pilot and co-pilot make the check return false? It doesn't check for array equality, but returns common unique elements from array1 and array2. If there's 5 players on the map, 2 already in the chopper and there's 2 AI in the chopper, arrayIntersect will only return the 2 players that are also part of the crew array. Just play around a bit with the command, might be easier to figure out, heh. Cheers 1 Share this post Link to post Share on other sites
Zjajo 9 Posted January 18, 2020 Thanks to the both of you. As Larrow mentioned, there is no need for me to make an unnecessary check that players are in trigger area, which works better for this situation since I had issues with the chopper landing inside the trigger at times. The final trigger condition is: !alive satPhone && allPlayers select{ alive _x && { _x in heli } } isEqualTo ( allPlayers select{ alive _x } ); The arrayIntersect command is very interesting though and I can see how useful it would be. Thanks again Share this post Link to post Share on other sites