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.
| 24 | 1 second |
|---|---|
| 120 | 5 seconds - short cooldowns, spawn intervals |
| 240 | 10 seconds |
| 720 | 30 seconds |
| 1440 | 1 minute |
| 7200 | 5 minutes - a common idle threshold |
| 14400 | 10 minutes |
| 86400 | 1 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();
},
}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.
