In the next module you will use death counters as variables. This is where you prepare them: pick unit types the map never uses and rename them to something you will recognise.
- 1Open the unit name editor in ScmDraft.
- 2Choose unit types that will never appear on the map.
- 3Rename them to something that says what they are for - Level, Exp, Gold, SpawnTimer.
- 4Place none of them on the map.
Which units you pick matters more in practice than it sounds. Some candidates are safe and some are not.
| 안전한 후보 | Safe: campaign hero units, units from a race you are not using, special buildings - anything that will never appear in this map. |
|---|---|
| 위험한 후보 | Risky: anything you might place even as decoration, and anything created or destroyed as a side effect of another unit dying. |
| 절대 피할 것 | Never: units the player actually uses, and units you spawn as mobs. |
The names appear verbatim in your triggers and EPScript, so they have to be readable. Once there are many, grouping them with a prefix keeps them manageable.
| Level, Gold, Exp | Per-player values - short and unambiguous. |
|---|---|
| SpawnTimer, WaveTimer | Timers named for what they time. |
| SkillCD, SkillDuration | Sharing a prefix within one feature makes them easy to find. |
If a unit you are using as a counter actually dies in game, the value climbs on its own and the variable is corrupt. The failure is silent - no error, just a value drifting - which makes it one of the hardest bugs to trace.
Once set, never change a unit name. Triggers and EPScript reference them by name, so one changed character stops the map compiling.
