-
Spawn Init
-
Events
-
Conditions
-
Actions
-
-------- Unit types --------
-
Set Units[1] = Zergling
-
Set Units[2] = Footman
-
Set Units[3] = Rifleman
-
Set Units[4] = Zombie
-
Set Units[5] = Grunt
-
Set Units[6] = Skeletal Mage
-
Set Units[7] = Shade
-
Set Units[8] = Necromancer
-
Set Units[9] = Giant Skeleton Warrior
-
Set Units[10] = Crypt Fiend
-
Set Units[11] = Hydralisk
-
Set Units[12] = Space Fel Orc
-
Set Units[13] = Banshee
-
Set Units[14] = Abomination
-
Set Units[15] = Misha (Level 4)
-
Set Units[16] = Spirit Wolf (Level 1)
-
Set Units[17] = Huntress
-
Set Units[18] = Tauren
-
Set Units[19] = Blue Dragonspawn Meddler
-
Set Units[20] = Thunder Lizard
-
Set Units[21] = Naga Royal Guard
-
Set Units[22] = Rock Golem
-
Set Units[23] = Mountain Giant
-
Set Units[24] = Ogre Magi
-
Set Units[25] = Ogre Lord
-
Set Units[26] = Dark Ranger
-
Set Units[27] = Lord Garithos
-
Set Units[28] = Arthas
-
Set Units[29] = Sea Witch
-
Set Units[30] = Pit Lord
-
Set Units[31] = Demon Hunter
-
Set Units[32] = Illidan
-
Set Units[33] = Avatar of Vengeance
-
Set Units[34] = Couatl
-
Set Units[35] = Hippogryph
-
Set Units[36] = Harpy Queen
-
Set Units[37] = Black Drake
-
Set Units[38] = Chimaera
-
Set Units[39] = Frost Wyrm
-
Set Units[40] = Red Drake
-
-------- Units' Count (how many units will be spawned, since you use different values for each wave) --------
-
Set UnitsCount[1] = 15
-
Set UnitsCount[2] = 15
-
Set UnitsCount[3] = 15
-
Set UnitsCount[4] = 16
-
Set UnitsCount[5] = 16
-
Set UnitsCount[6] = 16
-
Set UnitsCount[7] = 17
-
Set UnitsCount[8] = 17
-
Set UnitsCount[9] = 17
-
Set UnitsCount[10] = 18
-
Set UnitsCount[11] = 18
-
Set UnitsCount[12] = 18
-
Set UnitsCount[13] = 19
-
Set UnitsCount[14] = 19
-
Set UnitsCount[15] = 19
-
Set UnitsCount[16] = 20
-
Set UnitsCount[17] = 20
-
Set UnitsCount[18] = 20
-
Set UnitsCount[19] = 21
-
Set UnitsCount[20] = 21
-
Set UnitsCount[21] = 21
-
Set UnitsCount[22] = 21
-
Set UnitsCount[23] = 22
-
Set UnitsCount[24] = 22
-
Set UnitsCount[25] = 5
-
Set UnitsCount[26] = 23
-
Set UnitsCount[27] = 23
-
Set UnitsCount[28] = 23
-
Set UnitsCount[29] = 24
-
Set UnitsCount[30] = 24
-
Set UnitsCount[31] = 24
-
Set UnitsCount[32] = 25
-
Set UnitsCount[33] = 5
-
Set UnitsCount[34] = 25
-
Set UnitsCount[35] = 25
-
Set UnitsCount[36] = 26
-
Set UnitsCount[37] = 27
-
Set UnitsCount[38] = 28
-
Set UnitsCount[39] = 30
-
Set UnitsCount[40] = 1
-
-------- ------------------- --------
-
For each (Integer A) from 1 to 3, do (Actions)
-
Loop - Actions
-
Trigger - Add to Chat Init <gen> the event (Player - (Player((Integer A))) types a chat message containing -go as A substring)
-
Chat Init
-
Events
-
Conditions
-
(Substring((Entered chat string), 1, 3)) Equal to -go
-
Actions
-
Set WaveNumber = (Integer((Substring((Entered chat string), 4, (Length of (Entered chat string))))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
WaveNumber Less than or equal to 40
-
Then - Actions
-
Set SpawnPoint = (Center of SpawnArea <gen>)
-
For each (Integer A) from 1 to UnitsCount[WaveNumber], do (Actions)
-
Loop - Actions
-
Unit - Create 1 Units[WaveNumber] for Player 12 (Brown) at SpawnPoint facing Default building facing degrees
-
Game - Display to (All players) the text: (Current creeps' level: + ((String(WaveNumber)) + ( ( + ((Name of (Last created unit)) + ).))))
-
Custom script: call RemoveLocation (udg_SpawnPoint)
-
Else - Actions
SpawnPoint is a Point variable, WaveNumer is an Integer variable, UnitsCount[] is an Integer variable, Units[] is a Unit-type variable.
These two triggers replace the 40 triggers of yours.
For more about variables:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/