SCRMaps
/
Sign in

Switches

The lightest tool when all you need is on or off.

2 min read

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);
	},
}
The switch is what makes this trigger fire exactly once.

When you need a state rather than a number, a switch reads better than a death counter. It cannot hold anything per-player, though.

Sign in to track your progress