Attach a create action to the timer and you have a spawn. Two things matter in practice: stopping them piling up forever, and making them get harder over time.
Trigger { -- 필드에 30마리 미만일 때만 생성
players = {P8},
conditions = {
Deaths(P8, AtLeast, 120, "SpawnTimer");
Command(P8, AtMost, 30, "Zerg Zergling");
},
actions = {
SetDeaths(P8, SetTo, 0, "SpawnTimer");
CreateUnit(4, "Zerg Zergling", "Spawn Point", P8);
PreserveTrigger();
},
}For waves, keep the wave number in a counter and give each number its own trigger.
Trigger { -- 5분마다 웨이브 +1
players = {P8},
conditions = {
Deaths(P8, AtLeast, 7200, "WaveTimer");
},
actions = {
SetDeaths(P8, SetTo, 0, "WaveTimer");
SetDeaths(P8, Add, 1, "Wave");
DisplayText("\x13\x03다음 웨이브가 시작됩니다");
PreserveTrigger();
},
}
Trigger { -- 웨이브 3 이상이면 더 강한 적도 같이
players = {P8},
conditions = {
Deaths(P8, AtLeast, 120, "SpawnTimer");
Deaths(P8, AtLeast, 3, "Wave");
},
actions = {
CreateUnit(1, "Zerg Hydralisk", "Spawn Point", P8);
PreserveTrigger();
},
}If you need several spawn points, an alternative to copying the trigger per location is to keep one spawn location and move it around with MoveLocation.
