Detect if team is dead

Hey all,

I’m creating a 4v1 game mode, in which the solo person cannot die. But the 4 team can. Kind of like hide and seek. I’m having issues with creating a condition in which the game detects if all 4 players from the 4 player team are dead, and if the condition is true, then the solo player wins.

rule(“Team 2 Wins if Team 1 is Dead”)
{
event
{
Ongoing - Global;
}

conditions
{
(All Dead Players(Team 1) == All Players(Team 1) && Count Of(All Players(Team 1)) > 0) == True;
}

actions
{
Declare Round Victory(Team 2);
}
}

I believe this will get you going

1 Like

easier

conditions

All Living Players(Team 1) == Empty Array

End ^^ reduce not needed code :slight_smile:

1 Like

Wasn’t there an issue with, that Players who just joined and have not spawned yet are considered to be in the state of being Alive? If that’s still persists, wouldn’t the condition fail, cause All Living Players wouldn’t be an Empty Array anymore. Maybe i have missed something and it gladly got fixed, if so ofc this is the shortest and element saving way to do so.

1 Like

I try to take into account if all players leave or if the game starts without players, then this rule would still trigger.

1 Like