• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Pimp my GUI triggers!

Status
Not open for further replies.
Level 2
Joined
Dec 29, 2015
Messages
8
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. :(
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)
This was all my spawn, now the game initialization.
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)
THANK YOU FOR REWIEVING THE 5 MINUTE 1 LANE EXPERIENCE WAS AWESOME AND FUNNY THO HAHAHAHA!
 
Level 39
Joined
Feb 27, 2007
Messages
5,019
How To Post Your Trigger
  • Start
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Trigger - Run Start Timer Starts <gen> (checking conditions)
  • 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)
  • 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)
  • 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
  • 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
  • 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)
This was all my spawn, now the game initialization.
  • 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
  • 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)
  • 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)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
Your timers don't appear to work. I wouldn't use Timer Arrays and also you should always avoid using Waits/Wait for Condition. I think this is what you want:

So instead of using one timer, we use two. RoundStart spawns the waves and sets their skill tiers, and RoundRepeat periodically checks to see if all of the enemies have been killed and then starts RoundStart again.

  • Start
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: Countdown Started
      • Countdown Timer - Start RoundStart as a One-shot timer that will expire in 5.00 seconds
      • Countdown Timer - Create a timer window for RoundStart with title Enemy Wave In:
      • Set RoundStartWindow = (Last created timer window)
  • Round Start
    • Events
      • Time - RoundStart expires
    • Conditions
    • Actions
      • Countdown Timer - Hide RoundStartWindow
      • Set lvlnum = (lvlnum + 1)
      • Trigger - Run Set Tiers <gen> (checking conditions)
      • Trigger - Run Spawn <gen> (checking conditions)
      • Countdown Timer - Start RoundRepeat as a Repeating timer that will expire in 0.10 seconds
  • Round Repeat
    • Events
      • Time - RoundRepeat expires
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units owned by Player 17 (Wheat) matching (((Matching unit) is alive) Equal to True))) Equal to 0
        • Then - Actions
          • Game - Display to (All players) for 5.00 seconds the text: Countdown Started
          • Countdown Timer - Start RoundStart as a One-shot timer that will expire in 40.00 seconds
          • Countdown Timer - Show RoundStartWindow
          • Countdown Timer - Pause RoundRepeat
        • Else - Actions
IMPORTANT! Remove the Events from your Tier Levels and Spawn triggers since we're running them instead. In addition to that, make sure you remove "Set lvlnum = (lvlnum + 1)" from your Spawn trigger since it's already in the Round Start trigger.

  • Set Tiers
    • Events
    • Conditions
      • (lvlnum mod 5) Equal to 0
    • Actions
      • Set Tier_Number = (Tier_Number + 1)
^^^Just a little extra note, but you can avoid using "Or any conditions are true. lvlnum = 5, 10, 15, 20, 25, 30, 35, etc..." like you do in your Tier Levels trigger by using Modulo. A quick explanation of Modulo: Given two numbers, a (the dividend) and n (the divisor), a modulo n (abbreviated as amod n) is the remainder from the division of a by n.

But to keep it simple you can think of it as "Multiples of X" and disregard the "Equal to 0" part. So when lvlnum is a multiple of 5, then lvlnum mod 5 will be equal to 0.

Keep in mind that "0 mod X" is always equal to 0. However, it's not an issue in this case since lvlnum will always be greater than 0 when it comes time to run the trigger. I'm just letting you know this so that in the future if you ran into this problem then you will know to simply add the condition "YourInteger Not Equal to 0" along with the Modulo condition to prevent 0 from being seen as a multiple of X.

Your other triggers looked fine to me, I'm sure there's room for improvement but they looked good enough. I didn't notice any leaks or anything that would cause problems.
 
Last edited:
Level 2
Joined
Dec 29, 2015
Messages
8
MASSIVE THANK YOU! I kinda managed to improve most because if you add other dimension to the game, triggers might need a rework!
 
Level 8
Joined
May 21, 2019
Messages
435
In Spawn, you are setting 12 spawn locations based on non-variable regions and deleting them again at the end of every wave. Why don't you just set these locations in another trigger and then leave them at that? Right now you are setting and unsetting the same variables over and over for no real reason. This isn't all that taxing on your map, but it would clear 24 lines in this trigger to simply remove this.

In Spawn, Instead of running through units 1 - 7 one by one, why not just wrap it in a loop? This would make it 7 times faster to make any future changes, and would free up a lot of clutter.

In Spawn, do your units really have upwards of 20 abilities each? Seems a bit unlikely.

Is the difficulty of the waves largely dictated by ability levels? I get that you'd want these to scale, but how about the units themselves? You could easily set the strength of the waves by using upgrades instead. Alternatively, you can manually adjust the stats of each unit as it is summoned, but upgrades is definitely easier and faster.

in Var, your method of assigning variables is very manual and time consuming. You could easily loop this, seeing how you are clearly following a pattern of putting a new unit at the bottom and moving every other unit up by 1. In wave 2, for example, you add a banshee in Type7[2]. Then, you could simply assign Type6[2] to Type7[1] and so on. You can get the index of the previous wave simply by taking integer A - 1. For the new unit, you could define an array. Then you've effectively reduced the manual workload of adding a new wave to adding a single new unit to the array.
For numbers, you could simply run a loop that sets every entry to 1 (as is currently the case). Then whenever you have a scenario in which you want to change this number, you just overwrite it manually.

Alternatively, you can keep your current "complete overview" and just use a variable for the indexes instead. instead of typing in [13] 14 times in each wave, you simply set a variable to 13 and then insert this variable in the next 14 lines. This way, you only have to change a single number when copy-pasting a new wave instead of 14. This approach doesn't make the unit type thing easier though, so maybe a combination of the 2 would be easier if you plan on following this pattern.
 
Last edited:
Status
Not open for further replies.
Top