• 🏆 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!

Disable Remaining Actions?

Status
Not open for further replies.
Level 8
Joined
Mar 26, 2009
Messages
301
After a trigger is launched, it is useless to turn off the trigger to skip remaining actions. If I remember correct, there was a custom script which can be used in such sitiuations. What I exactly need is:
- An action that skips the rest of the actions in the current trigger (temporarily); or skips the remaining actions in another active trigger.
Example:
1-) A creep spawn trigger totally spawns 15 units. Units are spawned one at a time, and there is a 1 sec wait time. So it takes 15 secs to spawn them all.
2-) The action I am talking about is launched at 7th second so spawning loop ends there, with only 7 units spawned. But the action (script) does not destroy the trigger, making it unusable for another instance.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
You can do it like this. Depending on the boolean, the last 3 footmen might not spawn. Manipulate the boolean in some other trigger.

  • Untitled Trigger 079
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Wait 1.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • boolean Equal to True
        • Then - Actions
          • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
          • Wait 1.00 seconds
          • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
          • Wait 1.00 seconds
          • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        • Else - Actions
This could also be an option

  • Untitled Trigger 079
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Wait 1.00 seconds
      • If (boolean Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Wait 1.00 seconds
      • If (boolean Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Wait 1.00 seconds
      • If (boolean Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Wait 1.00 seconds
      • If (boolean Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Wait 1.00 seconds
      • If (boolean Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
 
Level 8
Joined
Mar 26, 2009
Messages
301
Umm, how about using this action?
  • Actions
    • Skip remaining actions
The JASS script of this is just return (a function stops once it 'returns' something, in this case the "something" is nothing :D).
Lol, to this day. I have never been aware of that action. No kidding =D
And about return thing. Can I use it in custom script? Like only typing "return" =D
Edit:
Is there a custom script that works like "Skip Remaining Actions in Trigger Blah Blah"; Blah Blah being the trigger name :D
Otherwise, I will have to start from scratch =)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Yes, you can ^^
It wouldn't be any different than using that action though :p

Edit:
Is there a custom script that works like "Skip Remaining Actions in Trigger Blah Blah"; Blah Blah being the trigger name :D
Otherwise, I will have to start from scratch =)
Then I suggest you use Maker's method, as you cannot return something for another function.

Create a boolean variable called "DoSkip" or something and set it to "true" in the trigger that makes another trigger skip an action.
In the trigger where the action is skipped, check if DoSkip == true, then skip the remaining actions.
 
Last edited:
Level 8
Joined
Mar 26, 2009
Messages
301
The trigger I use for spawning creeps is this:
  • Wave 5
    • Events
      • Game - A_Infected_Death_Count_Real becomes Equal to 100.00
    • Conditions
    • Actions
      • Set Wave_Number = 5
      • Wait 10.00 seconds
      • Game - Display to (All players) the text: |cffFF0000Wave 5|r
      • Sound - Play Incoming_Wave <gen>
      • Wait 5.00 seconds
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 1 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 1 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 2 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 2 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 3 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Wait Global_Raid_Interval seconds
      • Wait Global_Raid_Interval seconds
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 3 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 4 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 5 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 4 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 5 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Wait Global_Raid_Interval seconds
There is a -wave X command in the map that summons desired wave instantly.
Question: If I include boolean check into loop actions part of the trigger, it will check each time so It should stop spawning without problems. But, If another trigger changes the boolean value after spawning is stopped. Trigger will be still active in the background, check boolean value.. So, changing the boolean value back to normal will cause creeps to spawn (if any loop is left). Why I want to change the boolean value here? -wave X command can be typed at any time in the game, so it must disable the creep spawn of existing wave before starting another (also it will reset the board values) Otherwise A_Death_Count variable will taake inappropriate values by geting increased.
Technically what -wave X does:
1-) Disable current round's creep spawn,
2-) Kill existing units,
3-) Reset board values (kill counter etc..),
4-) Summon new wave.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Add an exit condition at the start of the spawn loops that breaks out the loops and function if a certain flag is set (stop spawning). Before spawn loops occur, you set a spawning flag to tell the system that you are spawning units.

Your interupt spawn system trigger works by setting the stop spawning flag to true and then itself waiting until the spawning flag is false. In all your spawn code, before starting the loop you set the spawning flag to true and then at the start of each itteration check if the stop spawning flag is set (true) which causes the spawning loop to immediatly stop. If the spawning loop finishes or if it was forcefully exited using the stop spawning flag you set the spawning flag to false.
 
Level 8
Joined
Mar 26, 2009
Messages
301
From what I understand, I've done something like this, which still doesn't work. Changing boolean back to normal value causes remaining spawn actions to perform, thus creating unwanted creeps. How do I solve this exactly?
  • Wave 11
    • Events
      • Game - A_Infected_Death_Count_Real becomes Equal to 550.00
    • Conditions
    • Actions
      • Set Wave_Number = 11
      • Wait 3.00 seconds
      • Quest - Display to (All players) the Hint message: |cff8080FFHint:|r G...
      • Wait 7.00 seconds
      • If (BOOL_Stop_Spawns Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Game - Display to (All players) the text: |cffFF0000Wave 11|r
      • Sound - Play Incoming_Wave <gen>
      • Wait 5.00 seconds
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • If (BOOL_Stop_Spawns Equal to True) then do (Skip remaining actions) else do (Do nothing)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 1 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 1 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 2 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 2 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 3 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Wait Global_Raid_Interval seconds
      • Wait Global_Raid_Interval seconds
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • If (BOOL_Stop_Spawns Equal to True) then do (Skip remaining actions) else do (Do nothing)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 3 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 4 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 5 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 4 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 5 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Wait Global_Raid_Interval seconds
      • Wait Global_Raid_Interval seconds
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • If (BOOL_Stop_Spawns Equal to True) then do (Skip remaining actions) else do (Do nothing)
          • Unit - Create 1 Ghoul for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 3 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Ghoul for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 4 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Ghoul for Player 4 (Purple) at (Center of SPAWN POINT NORTH 3 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Ghoul for Player 4 (Purple) at (Center of SPAWN POINT NORTH 4 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Ghoul for Player 4 (Purple) at (Center of SPAWN POINT NORTH 5 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Wait Global_Raid_Interval seconds
  • Wave X
    • Events
      • Player - Player 1 (Red) types a chat message containing -wave as A substring
    • Conditions
    • Actions
      • Set BOOL_Stop_Spawns = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 1
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 1 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 0
          • Set A_Infected_Death_Count_Real = 0.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 2
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 2 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 10
          • Set A_Infected_Death_Count_Real = 10.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 3
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 3 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 30
          • Set A_Infected_Death_Count_Real = 30.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 4
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 4 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 60
          • Set A_Infected_Death_Count_Real = 60.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 5
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 5 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 100
          • Set A_Infected_Death_Count_Real = 100.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 6
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 6 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 150
          • Set A_Infected_Death_Count_Real = 150.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 7
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 7 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 210
          • Set A_Infected_Death_Count_Real = 210.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 8
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 8 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 280
          • Set A_Infected_Death_Count_Real = 280.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 9
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 9 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 360
          • Set A_Infected_Death_Count_Real = 360.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 10
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 10 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 450
          • Set A_Infected_Death_Count_Real = 450.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 11
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 11 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 550
          • Set A_Infected_Death_Count_Real = 550.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 12
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 12 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 650
          • Set A_Infected_Death_Count_Real = 650.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 13
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 13 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 750
          • Set A_Infected_Death_Count_Real = 750.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 14
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 14 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 850
          • Set A_Infected_Death_Count_Real = 850.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 15
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 15 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 950
          • Set A_Infected_Death_Count_Real = 950.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 16
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 16 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1050
          • Set A_Infected_Death_Count_Real = 1050.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 17
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 17 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1160
          • Set A_Infected_Death_Count_Real = 1160.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 18
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 18 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1260
          • Set A_Infected_Death_Count_Real = 1260.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 19
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 19 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1360
          • Set A_Infected_Death_Count_Real = 1360.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 20
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 20 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1490
          • Set A_Infected_Death_Count_Real = 1490.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 21
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 21 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1590
          • Set A_Infected_Death_Count_Real = 1590.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 22
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 22 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1682
          • Set A_Infected_Death_Count_Real = 1682.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 23
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 23 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1776
          • Set A_Infected_Death_Count_Real = 1776.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 24
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 24 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1872
          • Set A_Infected_Death_Count_Real = 1872.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 25
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 25 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 1970
          • Set A_Infected_Death_Count_Real = 1970.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 26
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 26 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 2070
          • Set A_Infected_Death_Count_Real = 2070.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 27
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 27 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 2172
          • Set A_Infected_Death_Count_Real = 2172.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 28
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 28 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 2276
          • Set A_Infected_Death_Count_Real = 2276.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 29
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 29 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 2382
          • Set A_Infected_Death_Count_Real = 2382.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 30
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 30 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 2490
          • Set A_Infected_Death_Count_Real = 2490.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 31
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 31 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 2600
          • Set A_Infected_Death_Count_Real = 2600.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 32
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 32 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 2700
          • Set A_Infected_Death_Count_Real = 2700.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 33
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 33 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 2800
          • Set A_Infected_Death_Count_Real = 2800.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 34
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 34 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 2910
          • Set A_Infected_Death_Count_Real = 2910.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 35
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 35 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3030
          • Set A_Infected_Death_Count_Real = 3030.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 36
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 36 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3140
          • Set A_Infected_Death_Count_Real = 3140.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 37
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 37 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3261
          • Set A_Infected_Death_Count_Real = 3261.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 38
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 38 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3345
          • Set A_Infected_Death_Count_Real = 3345.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 39
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 39 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3434
          • Set A_Infected_Death_Count_Real = 3434.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 40
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 40 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3526
          • Set A_Infected_Death_Count_Real = 3526.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 41
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 41 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3623
          • Set A_Infected_Death_Count_Real = 3623.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 42
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 42 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3714
          • Set A_Infected_Death_Count_Real = 3714.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 43
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 43 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3799
          • Set A_Infected_Death_Count_Real = 3799.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 44
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 44 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3890
          • Set A_Infected_Death_Count_Real = 3890.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 45
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 45 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 3985
          • Set A_Infected_Death_Count_Real = 3985.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 46
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 46 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 4086
          • Set A_Infected_Death_Count_Real = 4086.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 47
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 47 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 4181
          • Set A_Infected_Death_Count_Real = 4181.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 48
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 48 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 4282
          • Set A_Infected_Death_Count_Real = 4282.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 49
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 49 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 4377
          • Set A_Infected_Death_Count_Real = 4377.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, 11)) Equal to 50
        • Then - Actions
          • Set COUNT_Units_In_Map = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 4 (Purple))))
          • Unit Group - Pick every unit in COUNT_Units_In_Map and do (Actions)
            • Loop - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 1500.00 damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup (udg_COUNT_Units_In_Map)
          • Wait 0.25 seconds
          • Trigger - Run Wave 50 <gen> (ignoring conditions)
          • Set Infected_Death_Count = 4478
          • Set A_Infected_Death_Count_Real = 4478.00
        • Else - Actions
      • Wait 0.25 seconds
      • Set BOOL_Stop_Spawns = False
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Use a local variable instead of integer A / B (is faster anyway).

The problem is nowhere do you tell the spawn changer to wait until the units stop spawning. Like I said you need 2 variables, 1 which breaks out of a spawn sequence and another which puts the spawn changer on hold until the spawn sequence has been broken out of.

Or....
You could design a proper spawn system whereby only 1 trigger/timer controls the spawning and you interface with it via variables and functions. Thus you can easilly break out of spawning sequences at any time.

Your current solution is very ugly.
 
Level 8
Joined
Mar 26, 2009
Messages
301
Use a local variable instead of integer A / B (is faster anyway).

The problem is nowhere do you tell the spawn changer to wait until the units stop spawning. Like I said you need 2 variables, 1 which breaks out of a spawn sequence and another which puts the spawn changer on hold until the spawn sequence has been broken out of.

Or....
You could design a proper spawn system whereby only 1 trigger/timer controls the spawning and you interface with it via variables and functions. Thus you can easilly break out of spawning sequences at any time.

Your current solution is very ugly.
Yes; and that's why it does not work :D And also, your explainations are too theroretical to be helpful for a WE noob such as myself. =) Presenting tiny examples of what you mean would suffice (instead of long texts) =)
(No offense =) )
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Presenting tiny examples of what you mean
You mean basically doing it for you?

You have a perodic trigger that fires every 1 second (or however long you want to wait before spawns within a wave). Its action is to spawn zombies of a variable type (their type is stored in an integer variable or some crappy subtype thereof in GUI). It then subtracts an integer keeping track of how many must be spawned by however many you spawn (note, you could make the spawn number per second a variable as well).
If the integer is 0 or less, it turns itself off and alearts some other system that the wave has ended (you need to design that system).

What you can do if you want to imediatly interupt the spawning system is to turn the trigger off, change the variables and when you are ready to start spawning agan, turn it on.

Ofcourse this is an example of just 1 spawning system, you could make it however you wish. The idea though is to standardise waves so that you duplicate as little code as possible.
 
Level 8
Joined
Mar 26, 2009
Messages
301
You mean basically doing it for you?
Of course not. Just telling you to go easy on the noob =) So you advise me to create a peridocal event trigger (with conditions to check spawned unit amount etc..) Do you think, with that, I'll be able to get rid of inappropriate number of spawns too - caused by following trigger?
  • Wave 5
    • Events
      • Game - A_Infected_Death_Count_Real becomes Equal to 100.00
    • Conditions
    • Actions
      • Set Wave_Number = 5
      • Wait 10.00 seconds
      • Game - Display to (All players) the text: |cffFF0000Wave 5|r
      • Sound - Play Incoming_Wave <gen>
      • Wait 5.00 seconds
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 1 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 1 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 2 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 2 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 3 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Wait Global_Raid_Interval seconds
      • Wait Global_Raid_Interval seconds
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 3 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 4 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 5 <gen>) facing 90.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 4 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 5 <gen>) facing 270.00 degrees
          • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
          • Wait Global_Raid_Interval seconds
..which is actually the topic of this thread: http://www.hiveworkshop.com/forums/...kill-count-system-problem-190832/#post1861078
=)
Edit:
Tried something like this which works fine in the beginning; but starts an absurd amount of lag after a while (wave 7-8 or sth)..
  • Wave 4
    • Events
      • Game - A_Infected_Death_Count_Real becomes Equal to 60.00
    • Conditions
    • Actions
      • Set Wave_Number = 4
      • Wait 10.00 seconds
      • If (BOOL_Stop_Spawns Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Game - Display to (All players) the text: |cffFF0000Wave 4|r
      • Sound - Play Incoming_Wave <gen>
      • Wait 5.00 seconds
      • If (BOOL_Stop_Spawns Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Quest - Display to (All players) the Hint message: |cff8080FFHint:|r Y...
      • Trigger - Turn on Wave 4 Creatures <gen>
  • Wave 4 Creatures
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • COUNT_Entering_Enemy_Unit Equal to 100
              • BOOL_Stop_Spawns Equal to True
        • Then - Actions
          • Skip remaining actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 1 <gen>) facing 270.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 1 <gen>) facing 90.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 2 <gen>) facing 270.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 2 <gen>) facing 90.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 3 <gen>) facing 270.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 3 <gen>) facing 90.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 4 <gen>) facing 270.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 4 <gen>) facing 90.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT NORTH 5 <gen>) facing 270.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
      • Unit - Create 1 Zombie for Player 4 (Purple) at (Center of SPAWN POINT SOUTH 5 <gen>) facing 90.00 degrees
      • Unit - Order (Last created unit) to Attack-Move To (Center of MAP CENTER <gen>)
Integer Variable named Entering Enemy Unit counts amount of enemy creeps enter the map.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Its cause you are leaking locations like crazy every 3 seconds atleast 20 of them...

Also that is not what I mean, I meant to break the problem down into separate sub systems to reduce code duplication and improve maintainability.

Currently you have 2 triggers per wave with huge amount of duplication between them. Trying to alter a wave is retardedly difficult due to this and it is very easy to create integrity faults (where due to duplication you create inconsistancies in the data like forgeting to change unit type or spawn location).

The idea is to create a system which does all common elements between waves. Differences between waves are controled via variables. You then create a wave system which likewise has minimal code duplication. This system controls the setting up of the spawn system using data from a series of arrays. Finally you use a series of arrays which you setup on map initialization to contain the data for the wave system to use.

Advantages...
Much less code.
Easier to change (1 change affects all waves).
Easier to maintain (1 change can change all).
Easier to program (less code to make in the first place).
 
Level 8
Joined
Mar 26, 2009
Messages
301
Its cause you are leaking locations like crazy every 3 seconds atleast 20 of them...
Come on, be more precise =) Is it "Center of Region" action that is leaking with periodic trigger? If yes, how should I proceed? If not, then what? =)
P.S: About Creep Spawn system; you have given great inspiration =) I'll try something new and may post it here for feedback =)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
If you read up and learn anything about leaks you will imediatly see where they are occuring. I even said you leak locations, there are only so many locations you use in that trigger. Yes it is that Center of Region and you respond to it by removing the location after you have used it (unlike currently where you just let it stick in memory and lose all references to it).

You basically store it in a varaible, use it and then remove it with the corosponding native.
 
Level 8
Joined
Mar 26, 2009
Messages
301
If you read up and learn anything about leaks you will imediatly see where they are occuring. I even said you leak locations, there are only so many locations you use in that trigger. Yes it is that Center of Region and you respond to it by removing the location after you have used it (unlike currently where you just let it stick in memory and lose all references to it).

You basically store it in a varaible, use it and then remove it with the corosponding native.
I see, I thought It was only an issue with point variables. Then again, center of a region is a point =)
 
Status
Not open for further replies.
Top