Hello guys! Please make my triggers work or help me optimize them, it was so fun playing my map but only 1 spawn worked so pls help. xD Also my timer bugs hard. 
This was all my spawn, now the game initialization.
THANK YOU FOR REWIEVING THE 5 MINUTE 1 LANE EXPERIENCE WAS AWESOME AND FUNNY THO HAHAHAHA!
Code:
Start
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Trigger - Run Start Timer Starts <gen> (checking conditions)
Code:
Start Timer Starts
Events
Conditions
Actions
Game - Display to (All players) the text: Countdown Started
Countdown Timer - Start RoundWindow[1] as a One-shot timer that will expire in 5.00 seconds
Set RoundWindow[1] = (Last started timer)
Countdown Timer - Create a timer window for RoundWindow[1] with title Enemy Wawe In:
Set RoundWindowWindow[1] = (Last created timer window)
Code:
Repeating Timer Starts
Events
Time - RoundWindow[1] expires
Conditions
Actions
Countdown Timer - Destroy RoundWindowWindow[1]
Wait until ((All units of (Units owned by Player 17 (Wheat)) are dead) Equal to True), checking every 1.00 seconds
Game - Display to (All players) the text: Countdown started!
Countdown Timer - Start RoundWindow[1] as a One-shot timer that will expire in 40.00 seconds
Set RoundWindow[1] = (Last started timer)
Countdown Timer - Create a timer window for RoundWindow[1] with title Enemy Wawe In:
Set RoundWindowWindow[1] = (Last created timer window)
Code:
Var
Events
Map initialization
Conditions
Actions
-------- Level 1 --------
Set unit_type[1] = Carrion Beetle
Set unit_type_var_two[1] = Carrion Beetle
Set unit_type_var_three[1] = Carrion Beetle
Set unit_type_var_four[1] = Carrion Beetle
Set unit_type_var_five[1] = Skeleton Warrior
Set unit_type_var_six[1] = Skeleton Warrior
Set unit_type_var_seven[1] = Ghoul
Set unit_amount[1] = 1
Set unit_amount_var_two[1] = 1
Set unit_amount_var_three[1] = 1
Set unit_amount_var_four[1] = 1
Set unit_amount_var_five[1] = 1
Set unit_amount_var_six[1] = 1
Set unit_amount_var_seven[1] = 1
Set lvlnum = 0
-------- Level 2 --------
Set unit_type[2] = Carrion Beetle
Set unit_type_var_two[2] = Carrion Beetle
Set unit_type_var_three[2] = Carrion Beetle
Set unit_type_var_four[2] = Skeleton Warrior
Set unit_type_var_five[2] = Skeleton Warrior
Set unit_type_var_six[2] = Ghoul
Set unit_type_var_seven[2] = Banshee
Set unit_amount[2] = 1
Set unit_amount_var_two[2] = 1
Set unit_amount_var_three[2] = 1
Set unit_amount_var_four[2] = 1
Set unit_amount_var_five[2] = 1
Set unit_amount_var_six[2] = 1
Set unit_amount_var_seven[2] = 1
-------- Level 3 --------
Set unit_type[3] = Carrion Beetle
Set unit_type_var_two[3] = Carrion Beetle
Set unit_type_var_three[3] = Skeleton Warrior
Set unit_type_var_four[3] = Skeleton Warrior
Set unit_type_var_five[3] = Ghoul
Set unit_type_var_six[3] = Ghoul
Set unit_type_var_seven[3] = Banshee
Set unit_amount[3] = 1
Set unit_amount_var_two[3] = 1
Set unit_amount_var_three[3] = 1
Set unit_amount_var_four[3] = 1
Set unit_amount_var_five[3] = 1
Set unit_amount_var_six[3] = 1
Set unit_amount_var_seven[3] = 1
-------- Level 4 --------
Set unit_type[4] = Carrion Beetle
Set unit_type_var_two[4] = Skeleton Warrior
Set unit_type_var_three[4] = Skeleton Warrior
Set unit_type_var_four[4] = Ghoul
Set unit_type_var_five[4] = Ghoul
Set unit_type_var_six[4] = Banshee
Set unit_type_var_seven[4] = Banshee
Set unit_amount[4] = 1
Set unit_amount_var_two[4] = 1
Set unit_amount_var_three[4] = 1
Set unit_amount_var_four[4] = 1
Set unit_amount_var_five[4] = 1
Set unit_amount_var_six[4] = 1
Set unit_amount_var_seven[4] = 1
-------- Level 5 --------
Set unit_type[5] = Carrion Beetle
Set unit_type_var_two[5] = Skeleton Warrior
Set unit_type_var_three[5] = Skeleton Warrior
Set unit_type_var_four[5] = Ghoul
Set unit_type_var_five[5] = Banshee
Set unit_type_var_six[5] = Banshee
Set unit_type_var_seven[5] = Meat Wagon
Set unit_amount[5] = 1
Set unit_amount_var_two[5] = 1
Set unit_amount_var_three[5] = 1
Set unit_amount_var_four[5] = 1
Set unit_amount_var_five[5] = 1
Set unit_amount_var_six[5] = 1
Set unit_amount_var_seven[5] = 1
-------- Level 6 --------
Set unit_type[6] = Skeleton Warrior
Set unit_type_var_two[6] = Skeleton Warrior
Set unit_type_var_three[6] = Ghoul
Set unit_type_var_four[6] = Ghoul
Set unit_type_var_five[6] = Banshee
Set unit_type_var_six[6] = Meat Wagon
Set unit_type_var_seven[6] = Abomination
Set unit_amount[6] = 1
Set unit_amount_var_two[6] = 1
Set unit_amount_var_three[6] = 1
Set unit_amount_var_four[6] = 1
Set unit_amount_var_five[6] = 1
Set unit_amount_var_six[6] = 1
Set unit_amount_var_seven[6] = 1
-------- Level 7 --------
Set unit_type[7] = Skeleton Warrior
Set unit_type_var_two[7] = Ghoul
Set unit_type_var_three[7] = Ghoul
Set unit_type_var_four[7] = Banshee
Set unit_type_var_five[7] = Meat Wagon
Set unit_type_var_six[7] = Abomination
Set unit_type_var_seven[7] = Crypt Fiend
Set unit_amount[7] = 1
Set unit_amount_var_two[7] = 1
Set unit_amount_var_three[7] = 1
Set unit_amount_var_four[7] = 1
Set unit_amount_var_five[7] = 1
Set unit_amount_var_six[7] = 1
Set unit_amount_var_seven[7] = 1
-------- Level 8 --------
Set unit_type[8] = Ghoul
Set unit_type_var_two[8] = Ghoul
Set unit_type_var_three[8] = Banshee
Set unit_type_var_four[8] = Meat Wagon
Set unit_type_var_five[8] = Abomination
Set unit_type_var_six[8] = Crypt Fiend
Set unit_type_var_seven[8] = Elder Voidwalker
Set unit_amount[8] = 1
Set unit_amount_var_two[8] = 1
Set unit_amount_var_three[8] = 1
Set unit_amount_var_four[8] = 1
Set unit_amount_var_five[8] = 1
Set unit_amount_var_six[8] = 1
Set unit_amount_var_seven[8] = 1
-------- Level 9 --------
Set unit_type[9] = Ghoul
Set unit_type_var_two[9] = Banshee
Set unit_type_var_three[9] = Meat Wagon
Set unit_type_var_four[9] = Abomination
Set unit_type_var_five[9] = Crypt Fiend
Set unit_type_var_six[9] = Elder Voidwalker
Set unit_type_var_seven[9] = Elder Voidwalker
Set unit_amount[9] = 1
Set unit_amount_var_two[9] = 1
Set unit_amount_var_three[9] = 1
Set unit_amount_var_four[9] = 1
Set unit_amount_var_five[9] = 1
Set unit_amount_var_six[9] = 1
Set unit_amount_var_seven[9] = 1
-------- Level 10 --------
Set unit_type[10] = Abomination
Set unit_type_var_two[10] = Banshee
Set unit_type_var_three[10] = Meat Wagon
Set unit_type_var_four[10] = Abomination
Set unit_type_var_five[10] = Crypt Fiend
Set unit_type_var_six[10] = Elder Voidwalker
Set unit_type_var_seven[10] = Death Revenant
Set unit_amount[10] = 1
Set unit_amount_var_two[10] = 1
Set unit_amount_var_three[10] = 1
Set unit_amount_var_four[10] = 1
Set unit_amount_var_five[10] = 1
Set unit_amount_var_six[10] = 1
Set unit_amount_var_seven[10] = 1
-------- Level 11 --------
Set unit_type[11] = Abomination
Set unit_type_var_two[11] = Crypt Fiend
Set unit_type_var_three[11] = Meat Wagon
Set unit_type_var_four[11] = Abomination
Set unit_type_var_five[11] = Elder Voidwalker
Set unit_type_var_six[11] = Death Revenant
Set unit_type_var_seven[11] = Infernal
Set unit_amount[11] = 1
Set unit_amount_var_two[11] = 1
Set unit_amount_var_three[11] = 1
Set unit_amount_var_four[11] = 1
Set unit_amount_var_five[11] = 1
Set unit_amount_var_six[11] = 1
Set unit_amount_var_seven[11] = 1
-------- Level 12 --------
Set unit_type[12] = Abomination
Set unit_type_var_two[12] = Crypt Fiend
Set unit_type_var_three[12] = Meat Wagon
Set unit_type_var_four[12] = Crypt Fiend
Set unit_type_var_five[12] = Elder Voidwalker
Set unit_type_var_six[12] = Death Revenant
Set unit_type_var_seven[12] = Infernal
Set unit_amount[12] = 1
Set unit_amount_var_two[12] = 1
Set unit_amount_var_three[12] = 1
Set unit_amount_var_four[12] = 1
Set unit_amount_var_five[12] = 1
Set unit_amount_var_six[12] = 1
Set unit_amount_var_seven[12] = 1
-------- Level 13 --------
Set unit_type[13] = Abomination
Set unit_type_var_two[13] = Crypt Fiend
Set unit_type_var_three[13] = Meat Wagon
Set unit_type_var_four[13] = Elder Voidwalker
Set unit_type_var_five[13] = Elder Voidwalker
Set unit_type_var_six[13] = Death Revenant
Set unit_type_var_seven[13] = Infernal
Set unit_amount[13] = 1
Set unit_amount_var_two[13] = 1
Set unit_amount_var_three[13] = 1
Set unit_amount_var_four[13] = 1
Set unit_amount_var_five[13] = 1
Set unit_amount_var_six[13] = 1
Set unit_amount_var_seven[13] = 1
-------- Level 14 --------
Set unit_type[14] = Abomination
Set unit_type_var_two[14] = Crypt Fiend
Set unit_type_var_three[14] = Meat Wagon
Set unit_type_var_four[14] = Elder Voidwalker
Set unit_type_var_five[14] = Death Revenant
Set unit_type_var_six[14] = Death Revenant
Set unit_type_var_seven[14] = Infernal
Set unit_amount[14] = 1
Set unit_amount_var_two[14] = 1
Set unit_amount_var_three[14] = 1
Set unit_amount_var_four[14] = 1
Set unit_amount_var_five[14] = 1
Set unit_amount_var_six[14] = 1
Set unit_amount_var_seven[14] = 1
-------- Level 15 --------
Set unit_type[15] = Abomination
Set unit_type_var_two[15] = Crypt Fiend
Set unit_type_var_three[15] = Meat Wagon
Set unit_type_var_four[15] = Elder Voidwalker
Set unit_type_var_five[15] = Death Revenant
Set unit_type_var_six[15] = Infernal
Set unit_type_var_seven[15] = Infernal
Set unit_amount[15] = 1
Set unit_amount_var_two[15] = 1
Set unit_amount_var_three[15] = 1
Set unit_amount_var_four[15] = 1
Set unit_amount_var_five[15] = 1
Set unit_amount_var_six[15] = 1
Set unit_amount_var_seven[15] = 1
Code:
Spawn
Events
Time - RoundWindow[1] expires
Conditions
Actions
Set loc[1] = (Center of Spawn 1 <gen>)
Set loc[2] = (Center of Spawn 2 <gen>)
Set loc[3] = (Center of Spawn 3 <gen>)
Set loc[4] = (Center of Spawn 4 <gen>)
Set loc[5] = (Center of Spawn 5 <gen>)
Set loc[6] = (Center of Spawn 6 <gen>)
Set loc[7] = (Center of Spawn 7 <gen>)
Set loc[8] = (Center of Spawn 8 <gen>)
Set loc[9] = (Center of Spawn 9 <gen>)
Set loc[10] = (Center of Spawn 10 <gen>)
Set loc[11] = (Center of Spawn 11 <gen>)
Set loc[12] = (Center of Spawn 12 <gen>)
Set lvlnum = (lvlnum + 1)
Game - Display to (All players) the text: (|c00999900Round + (|c00990000 + ((String(lvlnum)) + (|r + |c00999900has started!|r))))
Set Spawn_Players = (All players matching (((Matching player) controller) Not equal to None))
Player Group - Pick every player in Spawn_Players and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EnemySpawn[(Player number of (Picked player))] Equal to True
Then - Actions
Unit - Create unit_amount[lvlnum] unit_type[lvlnum] for Player 17 (Wheat) at loc[(Player number of (Picked player))] facing Default building facing degrees
Set Unit[1] = (Last created unit)
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
Unit - Set level of Unit_Ability[(Integer A)] for Unit[1] to Tier_Number
Unit - Create unit_amount_var_two[lvlnum] unit_type_var_two[lvlnum] for Player 17 (Wheat) at loc[(Player number of (Picked player))] facing Default building facing degrees
Set Unit[2] = (Last created unit)
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
Unit - Set level of Unit_Ability[(Integer A)] for Unit[2] to Tier_Number
Unit - Create unit_amount_var_three[lvlnum] unit_type_var_three[lvlnum] for Player 17 (Wheat) at loc[(Player number of (Picked player))] facing Default building facing degrees
Set Unit[3] = (Last created unit)
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
Unit - Set level of Unit_Ability[(Integer A)] for Unit[3] to Tier_Number
Unit - Create unit_amount_var_five[lvlnum] unit_type_var_five[lvlnum] for Player 17 (Wheat) at loc[(Player number of (Picked player))] facing Default building facing degrees
Set Unit[4] = (Last created unit)
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
Unit - Set level of Unit_Ability[(Integer A)] for Unit[4] to Tier_Number
Unit - Create unit_amount_var_four[lvlnum] unit_type_var_four[lvlnum] for Player 17 (Wheat) at loc[(Player number of (Picked player))] facing Default building facing degrees
Set Unit[5] = (Last created unit)
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
Unit - Set level of Unit_Ability[(Integer A)] for Unit[5] to Tier_Number
Unit - Create unit_amount_var_six[lvlnum] unit_type_var_six[lvlnum] for Player 17 (Wheat) at loc[(Player number of (Picked player))] facing Default building facing degrees
Set Unit[6] = (Last created unit)
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
Unit - Set level of Unit_Ability[(Integer A)] for Unit[6] to Tier_Number
Unit - Create unit_amount_var_seven[lvlnum] unit_type_var_seven[lvlnum] for Player 17 (Wheat) at loc[(Player number of (Picked player))] facing Default building facing degrees
Set Unit[7] = (Last created unit)
For each (Integer A) from 1 to 20, do (Actions)
Loop - Actions
Unit - Set level of Unit_Ability[(Integer A)] for Unit[7] to Tier_Number
Custom script: call RemoveLocation( udg_loc[1] )
Custom script: call RemoveLocation( udg_loc[2] )
Custom script: call RemoveLocation( udg_loc[3] )
Custom script: call RemoveLocation( udg_loc[4] )
Custom script: call RemoveLocation( udg_loc[5] )
Custom script: call RemoveLocation( udg_loc[6] )
Custom script: call RemoveLocation( udg_loc[7] )
Custom script: call RemoveLocation( udg_loc[8] )
Custom script: call RemoveLocation( udg_loc[9] )
Custom script: call RemoveLocation( udg_loc[10] )
Custom script: call RemoveLocation( udg_loc[11] )
Custom script: call RemoveLocation( udg_loc[12] )
Set Unit[1] = No unit
Set Unit[2] = No unit
Set Unit[3] = No unit
Set Unit[4] = No unit
Set Unit[5] = No unit
Set Unit[6] = No unit
Set Unit[7] = No unit
Else - Actions
Code:
Tier Level
Events
Time - RoundWindow[1] expires
Conditions
Or - Any (Conditions) are true
Conditions
lvlnum Equal to 5
lvlnum Equal to 10
lvlnum Equal to 15
lvlnum Equal to 20
lvlnum Equal to 25
lvlnum Equal to 30
lvlnum Equal to 35
lvlnum Equal to 40
lvlnum Equal to 45
lvlnum Equal to 50
Actions
Set Tier_Number = (Tier_Number + 1)
Code:
Melee Initialization
Events
Map initialization
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) controller) Not equal to None
Then - Actions
Set EnemySpawn[(Player number of (Picked player))] = True
Else - Actions
Player - Add 1000 to (Picked player) Current gold
Camera - Pan camera for (Picked player) to (Center of Choosing Place <gen>) over 0.00 seconds
Selection - Select Tavern 1 0007 <gen> for (Picked player)
Player Group - Add Player 1 (Red) to Player_Group[1]
Player Group - Add Player 2 (Blue) to Player_Group[1]
Player Group - Add Player 3 (Teal) to Player_Group[1]
Player Group - Add Player 4 (Purple) to Player_Group[2]
Player Group - Add Player 5 (Yellow) to Player_Group[2]
Player Group - Add Player 6 (Orange) to Player_Group[2]
Player Group - Add Player 7 (Green) to Player_Group[3]
Player Group - Add Player 8 (Pink) to Player_Group[3]
Player Group - Add Player 9 (Gray) to Player_Group[3]
Player Group - Add Player 10 (Light Blue) to Player_Group[4]
Player Group - Add Player 11 (Dark Green) to Player_Group[4]
Player Group - Add Player 12 (Brown) to Player_Group[4]
Player Group - Make Player Group - Player 13 (Maroon) treat Player_Group[1] as an Ally with shared vision
Player Group - Make Player_Group[1] treat Player Group - Player 13 (Maroon) as an Ally with shared vision
Player Group - Make Player_Group[1] treat Player_Group[1] as an Ally with shared vision
Player Group - Make Player Group - Player 14 (Navy) treat Player_Group[2] as an Ally with shared vision
Player Group - Make Player_Group[2] treat Player Group - Player 14 (Navy) as an Ally with shared vision
Player Group - Make Player_Group[2] treat Player_Group[2] as an Ally with shared vision
Player Group - Make Player Group - Player 15 (Turquoise) treat Player_Group[3] as an Ally with shared vision
Player Group - Make Player_Group[3] treat Player Group - Player 15 (Turquoise) as an Ally with shared vision
Player Group - Make Player_Group[3] treat Player_Group[3] as an Ally with shared vision
Player Group - Make Player Group - Player 16 (Violet) treat Player_Group[4] as an Ally with shared vision
Player Group - Make Player_Group[4] treat Player Group - Player 16 (Violet) as an Ally with shared vision
Player Group - Make Player_Group[4] treat Player_Group[4] as an Ally with shared vision
Player Group - Make (All players) treat Player Group - Player 17 (Wheat) as an Enemy with shared vision
Player Group - Make Player Group - Player 17 (Wheat) treat (All players) as an Enemy with shared vision
Player - Turn Gives bounty On for Player 17 (Wheat)
Visibility - Disable black mask
Visibility - Disable fog of war
Code:
Player Loses
Events
Player - Player 1 (Red) leaves the game with a defeat
Player - Player 2 (Blue) leaves the game with a defeat
Player - Player 3 (Teal) leaves the game with a defeat
Player - Player 4 (Purple) leaves the game with a defeat
Player - Player 5 (Yellow) leaves the game with a defeat
Player - Player 6 (Orange) leaves the game with a defeat
Player - Player 7 (Green) leaves the game with a defeat
Player - Player 8 (Pink) leaves the game with a defeat
Player - Player 9 (Gray) leaves the game with a defeat
Player - Player 10 (Light Blue) leaves the game with a defeat
Player - Player 11 (Dark Green) leaves the game with a defeat
Player - Player 12 (Brown) leaves the game with a defeat
Conditions
Actions
Set LosingPlayerGroup[1] = (All players matching (((Matching player) slot status) Equal to Has left the game))
Player Group - Pick every player in LosingPlayerGroup[1] and do (Actions)
Loop - Actions
Set EnemySpawn[(Player number of (Picked player))] = False
Set Losing_Group = (Units owned by (Picked player))
Unit Group - Pick every unit in Losing_Group and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Player Group - Remove all players from LosingPlayerGroup[1]
Custom script: call DestroyGroup(udg_Losing_Group)
Code:
Player Leaves
Events
Player - Player 1 (Red) leaves the game
Player - Player 2 (Blue) leaves the game
Player - Player 3 (Teal) leaves the game
Player - Player 4 (Purple) leaves the game
Player - Player 5 (Yellow) leaves the game
Player - Player 6 (Orange) leaves the game
Player - Player 7 (Green) leaves the game
Player - Player 8 (Pink) leaves the game
Player - Player 9 (Gray) leaves the game
Player - Player 10 (Light Blue) leaves the game
Player - Player 11 (Dark Green) leaves the game
Player - Player 12 (Brown) leaves the game
Conditions
Actions
Set LosingPlayerGroup[1] = (All players matching (((Matching player) slot status) Equal to Has left the game))
Player Group - Pick every player in LosingPlayerGroup[1] and do (Actions)
Loop - Actions
Set EnemySpawn[(Player number of (Picked player))] = False
Set Losing_Group = (Units owned by (Picked player))
Unit Group - Pick every unit in Losing_Group and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Player Group - Remove all players from LosingPlayerGroup[1]
Custom script: call DestroyGroup(udg_Losing_Group)