Jump to content
Sign in to follow this  
wiggum2

Trigger that checks for all human players in trigger area (respawn mission)

Recommended Posts

Hi !

How would i check (in a mission with respawn so one or more players could "dead" and waiting for respawn) if all human players (and JIP players) are inside a trigger area ?

Lets say we start the mission with 2 human players and 2 more join later (JIP), if all 4 human players are now in that trigger area the trigger should activate but if one ore more players are currently waiting for respawn (are currently dead) it should not activate, instead it should activate after the dead players respawned and also moved into the trigger area (so we would have all 4 players in the trigger area).

{_x in thislist} count playableUnits == count playableUnits;

(i think there are problems with JIP players and playableUnits...

Is there a better solution ?

And what if i would want to only check for alive human players, so players that are currently waiting for respawn are not needed inside the trigger area for the trigger to activate ?

Edited by Wiggum

Share this post


Link to post
Share on other sites

perhaps (Untested)

{Isplayer _x in thislist} count playableUnits == {IsPlayer _x} count playableUnits;

{(alive _x && Isplayer _x) in thislist} count playableUnits == {(alive _x && IsPlayer _x)} count playableUnits;

Share this post


Link to post
Share on other sites

Can someone confirm that playableUnits is not working correct for JIP players ?

Share this post


Link to post
Share on other sites

Ok:

This does also trigger if the players are dead and waiting for respawn:

{(alive _x && Isplayer _x) in thislist} count playableUnits == {(alive _x && IsPlayer _x)} count playableUnits; 

I only want it to activate once all alive player units are inside the trigger area.

Examples:

Player 1 & 2 alive and inside area but player 3 is waiting for respawn = not activate

Player 1, 2 & 3 dead and waiting for respawn = not activate

Player 1, 2 & 3 alive and inside trigger area = activate

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×