SCRMaps
/
Sign in

Measuring time with death counters

Under EUD Turbo, 24 deaths is one real second. Every period in your map comes from that one conversion.

5 min read

The earlier module noted that turning on EUD Turbo makes Wait unusable. So nearly all timekeeping in a map is done with a death counter: add one every trigger cycle and the counter becomes your clock.

There is one number to remember. Under EUD Turbo the trigger loop runs about 24 times a second, so 24 deaths is one real second.

Conversion
241 second
1205 seconds - short cooldowns, spawn intervals
24010 seconds
72030 seconds
14401 minute
72005 minutes - a common idle threshold
1440010 minutes
864001 hour

It is about 24, not exactly 24 - it drifts a little with game speed and load. Do not rely on it where a precise second matters; it is entirely adequate for cooldowns and spawn intervals, where “roughly this many seconds” is the requirement.

The structure is always two triggers: one counts, and one fires at the target and resets it.

Trigger { -- 매 사이클 1씩
	players = {P8},
	conditions = {
		Always();
	},
	actions = {
		SetDeaths(P8, Add, 1, "SpawnTimer");
		PreserveTrigger();
	},
}

Trigger { -- 5초마다 실행
	players = {P8},
	conditions = {
		Deaths(P8, AtLeast, 120, "SpawnTimer");
	},
	actions = {
		SetDeaths(P8, SetTo, 0, "SpawnTimer");
		CreateUnit(4, "Zerg Zergling", "Spawn Point", P8);
		PreserveTrigger();
	},
}
120 is five seconds. To change the interval, you change that one number using the table above.

The counting trigger must sit above the firing trigger; reversed, everything lags by one cycle.

For anything counted per player - cooldowns, respawns - use Force1 and CurrentPlayer instead of P8. Keep map-wide counters like waves and rounds on P8.

StarCraft also has a Countdown Timer - the one that shows remaining time at the top of the screen. There is only one of it and it is always visible, so it suits things the player is meant to watch, such as a round limit. For internal periods, use a death counter.

Sign in to track your progress