steew 10 Posted October 23, 2013 Hello, I need to end co-op mission with trigger, when enemy unit which has to be killed is s1 and all players must be present in the trigger zone. So the condition for this trigger i have "!alive s1 and player in thislist" ... this is what i found on this forum. . . But it doesn't work . . . I tried many options from the internet, but nothing worked for me . . . Could you please help me ? :) Share this post Link to post Share on other sites
Larrow 2695 Posted October 23, 2013 Something like... (!(alive s1) && ( {alive _x && isPlayer _x && [ thisTrigger, _x] call BIS_fnc_inTrigger}count (playableUnits + switchableUnits) == {alive _x && isPlayer _x}count (playableUnits + switchableUnits)) ) Can be cut down a bit but i have written this as a catch all as i dont know... are there just players or will you have AI team mates with you?, are the players all in the same group?. If S1 is dead and the count of all playableunits (MP) + switchableUnits (SP for testing in the editor) that are alive are players and are in the trigger is equal to the count of all playableunits (MP) + switchableUnits (SP for testing in the editor) that are alive and are players then ..... If your planning on having AI with you and want to count these aswell you can remove both the isPlayer commands. Playable and switchable are ok to leave both in no matter what game mode your using, playable will return a blank array in the editor/SP and switchable will do the same in MP. If all the units you want to know about are in a known group the you can replace playable + switchable for this group e.g count units group player Share this post Link to post Share on other sites
steew 10 Posted October 24, 2013 I have there many groups . . . I tried more options .. Only players in, every playable units and switchable units .. but this what you written works exactly as I need ! :) so many thanks ! I had switchable units in the trigger ( when i was in editor) the trigger didn't run, but, when I teleported there the trigger works properly . . . Many thanks ! Share this post Link to post Share on other sites
Doodle 10 Posted October 25, 2013 Something like...(!(alive s1) && ( {alive _x && isPlayer _x && [ thisTrigger, _x] call BIS_fnc_inTrigger}count (playableUnits + switchableUnits) == {alive _x && isPlayer _x}count (playableUnits + switchableUnits)) ) Can be cut down a bit but i have written this as a catch all as i dont know... are there just players or will you have AI team mates with you?, are the players all in the same group?. If S1 is dead and the count of all playableunits (MP) + switchableUnits (SP for testing in the editor) that are alive are players and are in the trigger is equal to the count of all playableunits (MP) + switchableUnits (SP for testing in the editor) that are alive and are players then ..... Sorry to hijack this but looking for a similar solution - exactly the same but so trigger activates when ALL human blue players are in trigger on a dedi - the above works only of there is a player s1 in my case player s1 might not be palying at the time the mission ends Thnaks in advance Share this post Link to post Share on other sites
jw custom 56 Posted October 25, 2013 Try with: Activation: Any Condition: ({alive _x} count playableUnits == {_x in thisList} count playableUnits) && ({alive _x} count playableUnits > 0) This should go off when ALL ALIVE PLAYABLE UNITS is within the trigger area! Share this post Link to post Share on other sites