A switch is an on/off flag shared by the whole map. There are 256 of them, and they are global rather than per player.
Trigger {
players = {P8},
conditions = {
Switch("Boss Spawned", NotSet);
Deaths(P8, AtLeast, 600, "GameTimer");
},
actions = {
SetSwitch("Boss Spawned", Set);
CreateUnit(1, "Boss Unit", "Boss Spawn", P8);
},
}When you need a state rather than a number, a switch reads better than a death counter. It cannot hold anything per-player, though.
