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

[Trigger] Wave Spawning

Status
Not open for further replies.
Level 7
Joined
Sep 19, 2012
Messages
204
Hey Guys. Since i am still looking for someone who can make me a tutorial cinematic for Technichal Warfare, i didnt want to continue work on it till i got this. So i got bored and started a new map XD
Right now i am trying to get a wave spawn running like in X Hero siege.
I used this Tutorial to make a spawning system: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/multiple-creep-spawn-system-32436/. Now i am Trying to change this system but i got completely stuck...maybe you can help me out ^^

i want this system to keep on spawning the Same stuff every Wave until i tell it to start Spawning the next/ the new wave.
is that possible or should i try to find a completely different system?

Greetings CodeBlack :goblin_yeah:
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
That's easy to achieve, you just use integers/or/booleans to detect which wave you're currently at. This is an example for just two waves :
  • Wave
  • Events
    • Time - Timer Wave expires
  • Conditions
  • Actions
    • WaveNumber = (WaveNumber + 1)
    • Trigger - Run WaveTrigger[WaveNumber] ( Ignore Conditions )
    • Trigger - Turn off CreepLevel[(WaveNumber - 1)]
    • Trigger - Turn on CreepLevel[(WaveNumber)]
I am sorry I couldn't explain so much but if you want a test map you can request that I'd make it for u
 
Level 7
Joined
Sep 19, 2012
Messages
204
That's easy to achieve, you just use integers/or/booleans to detect which wave you're currently at. This is an example for just two waves :
  • Wave
  • Events
    • Time - Timer Wave expires
  • Conditions
  • Actions
    • WaveNumber = (WaveNumber + 1)
    • Trigger - Run WaveTrigger[WaveNumber] ( Ignore Conditions )
    • Trigger - Turn off CreepLevel[(WaveNumber - 1)]
    • Trigger - Turn on CreepLevel[(WaveNumber)]
I am sorry I couldn't explain so much but if you want a test map you can request that I'd make it for u

is this meant as an addition to the system i am using or as new system?
 
Level 7
Joined
Sep 19, 2012
Messages
204
Can you post your specific triggers ?

  • Var
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Level 1 --------
      • Set unit_type[1] = Evil Sapling
      • Set unit_type_var_two[1] = Evil Sapling
      • Set unit_type_var_three[1] = Evil Sapling
      • Set unit_amount[1] = 8
      • Set unit_amount_var_two[1] = 4
      • Set unit_amount_var_three[1] = 3
      • Set lvlnum = 0
      • -------- Level 2 --------
      • Set unit_type[2] = Evil Sapling
      • Set unit_type_var_two[2] = Evil Sapling
      • Set unit_type_var_three[2] = Evil Sapling
      • Set unit_amount[2] = 8
      • Set unit_amount_var_two[2] = 4
      • Set unit_amount_var_three[2] = 3
      • -------- Level 3 --------
      • Set unit_type[3] = Evil Sapling
      • Set unit_type_var_two[3] = Evil Sapling
      • Set unit_type_var_three[3] = Evil Sapling
      • Set unit_amount[3] = 8
      • Set unit_amount_var_two[3] = 4
      • Set unit_amount_var_three[3] = 3
  • Spawn
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Set lvlnum = (lvlnum + 1)
      • Game - Display to (All players) the text: (|c00999900Round + (|c00990000 + ((String(lvlnum)) + (|r + |c00999900has started!|r))))
      • Set loc[1] = (Center of TEST <gen>)
      • Set loc[2] = (Center of test2 <gen>)
      • For each (Integer A) from 1 to unit_amount[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_three[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_three[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type_var_three[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_two[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_two[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type_var_two[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • 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] )
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
In your system this is what increases the level.
  • Set lvlnum = (lvlnum + 1)
All you have to do is to remove that and only increase it when you want. Use an ITE or another trigger to do this. When it is not increased it will continually spawn the current wave the next time the timer expires.

Also never use integer A/B. Use an integer made in the variable editor.
You leak locations. You should look at this tutorial. http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

Set all locations that are used in the spawn trigger into a variable at 0.00 elapsed game time trigger. Never remove / set these locations to any other variable and always use them in your spawn trigger.

You should also take a look at my tutorial. Things You Should Know When Using Triggers / GUI. Link is in my sig.
 
Level 7
Joined
Sep 19, 2012
Messages
204
In your system this is what increases the level.
  • Set lvlnum = (lvlnum + 1)
All you have to do is to remove that and only increase it when you want. Use an ITE or another trigger to do this. When it is not increased it will continually spawn the current wave the next time the timer expires.

Also never use integer A/B. Use an integer made in the variable editor.
You leak locations. You should look at this tutorial. http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

Set all locations that are used in the spawn trigger into a variable at 0.00 elapsed game time trigger. Never remove / set these locations to any other variable and always use them in your spawn trigger.

You should also take a look at my tutorial. Things You Should Know When Using Triggers / GUI. Link is in my sig.

I dont get it XD
i picked the line
  • Set lvlnum = (lvlnum + 1)
and put it into another trigger i could manually trigger (just for testing).
then i set lvlnum to 1 as start value, but the trigger says spawning wave 0 and nothing happens.

EDIT: Error found...seems like i cant set this variable with game init. needed to make an trigger with time elapsed 0.0 ;)
TANK YOU VERY MUCH +rep
 
Last edited:
Level 7
Joined
Sep 19, 2012
Messages
204
ok here i am again ;)

now i got a new problem with spawning waves XD

i set up a 1 to 1 copy (using its own variables) of the spawn trigger for the other team (there are 2 teams on my map) now i got this problem: the spawn starts when an timer expires, i made two timer using different variables (Clock1 and Clock2).
When both are running only Team 2 spawns, when i disable only the clock2, team 1 spawns <.<
My timers seem to block each other or sth like that, even if both are showing up properly.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
ok here i am again ;)

now i got a new problem with spawning waves XD

i set up a 1 to 1 copy (using its own variables) of the spawn trigger for the other team (there are 2 teams on my map) now i got this problem: the spawn starts when an timer expires, i made two timer using different variables (Clock1 and Clock2).
When both are running only Team 2 spawns, when i disable only the clock2, team 1 spawns <.<
My timers seem to block each other or sth like that, even if both are showing up properly.

That is the problem with that guide as it is outdated. You do not need to copy the triggers to allow for teams to spawn at different times. You simple make the team have its own counter. Example of what this does. Team 1 has a counter that is at 2. Team 2 has a counter at 7.
When team 1 spawns it will spawn the level 2 units. When team 2 spawns it will spawn the level 7 units.


Show us the triggers please so I can try to help you fix your problem.
 
Level 7
Joined
Sep 19, 2012
Messages
204
That is the problem with that guide as it is outdated. You do not need to copy the triggers to allow for teams to spawn at different times. You simple make the team have its own counter. Example of what this does. Team 1 has a counter that is at 2. Team 2 has a counter at 7.
When team 1 spawns it will spawn the level 2 units. When team 2 spawns it will spawn the level 7 units.


Show us the triggers please so I can try to help you fix your problem.

Problem with using the same system is, that i am changing units while you go on in the map, this would mean, that the other team also gets the new units.


The spawn Trigger:
  • Spawn Events
    • Time - Timer expires
    • Conditions
    • Actions
      • Set lvl_Display = (lvl_Display + 1)
      • Game - Display to (All allies of Player 1 (Red)) the text: (|c00999900Round + (|c00990000 + ((String(lvl_Display)) + (|r + |c00999900has started!|r))))
      • For each (Integer A) from 1 to unit_amount[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_two[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_two[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type_var_two[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_three[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_three[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type_var_three[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
[/TRIGGER]

the Unit star Setup:
  • Var
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Level 1 --------
      • Set unit_type[1] = Evil Sapling (Wave)
      • Set unit_type_var_two[1] = Evil Sapling (Wave)
      • Set unit_type_var_three[1] = Evil Sapling (Wave)
      • Set unit_amount[1] = 8
      • Set unit_amount_var_two[1] = 4
      • Set unit_amount_var_three[1] = 3
      • Set lvlnum = 0
      • -------- Level 2 --------
      • Set unit_type[2] = Evil Sapling (Wave)
      • Set unit_type_var_two[2] = Small Treant (Wave)
      • Set unit_type_var_three[2] = Evil Sapling (Wave)
      • Set unit_amount[2] = 8
      • Set unit_amount_var_two[2] = 3
      • Set unit_amount_var_three[2] = 4
      • -------- Level 3 --------
      • Set unit_type[3] = Evil Sapling (Wave)
      • Set unit_type_var_two[3] = Small Treant (Wave)
      • Set unit_type_var_three[3] = Poison Spider (Wave)
      • Set unit_amount[3] = 8
      • Set unit_amount_var_two[3] = 3
      • Set unit_amount_var_three[3] = 4
      • -------- Level 4 --------
      • Set unit_type[4] = Evil Sapling (Wave)
      • Set unit_type_var_two[4] = Small Treant (Wave)
      • Set unit_type_var_three[4] = Poison Spider (Wave)
      • Set unit_amount[4] = 4
      • Set unit_amount_var_two[4] = 5
      • Set unit_amount_var_three[4] = 6
      • -------- Level 5 --------
      • Set unit_type[5] = Small Treant (Wave)
      • Set unit_type_var_two[5] = Poison Spider (Wave)
      • Set unit_type_var_three[5] = Claw Beast (Wave)
      • Set unit_amount[5] = 7
      • Set unit_amount_var_two[5] = 6
      • Set unit_amount_var_three[5] = 2
      • -------- Level 6 --------
      • Set unit_type[6] = Small Treant (Wave)
      • Set unit_type_var_two[6] = Poison Spider (Wave)
      • Set unit_type_var_three[6] = Claw Beast (Wave)
      • Set unit_amount[6] = 6
      • Set unit_amount_var_two[6] = 6
      • Set unit_amount_var_three[6] = 3
      • -------- Level 7 --------
      • Set unit_type[7] = Small Treant (Wave)
      • Set unit_type_var_two[7] = Poison Spider (Wave)
      • Set unit_type_var_three[7] = Claw Beast (Wave)
      • Set unit_amount[7] = 4
      • Set unit_amount_var_two[7] = 4
      • Set unit_amount_var_three[7] = 7
the Trigger that makes Waves Stronger:
  • Wave Increase
    • Events
      • Time - Timer expires
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • lvl_Display Equal to 5
          • lvl_Display Equal to 10
          • lvl_Display Equal to 15
          • lvl_Display Equal to 20
          • lvl_Display Equal to 25
          • lvl_Display Equal to 30
    • Actions
      • Set lvlnum = (lvlnum + 1)
      • Game - Display to (All allies of Player 1 (Red)) the text: |c00FF0000Waves are...
Example for Region Change trigger (at the moment same units):
  • Region 2 Set up
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- General Settings --------
      • Set lvl_Display = 1
      • Set lvlnum = 1
      • -------- Level 1 --------
      • Set unit_type[1] = Evil Sapling (Wave)
      • Set unit_type_var_two[1] = Evil Sapling (Wave)
      • Set unit_type_var_three[1] = Evil Sapling (Wave)
      • Set unit_amount[1] = 8
      • Set unit_amount_var_two[1] = 4
      • Set unit_amount_var_three[1] = 3
      • Set lvlnum = 0
      • -------- Level 2 --------
      • Set unit_type[2] = Evil Sapling (Wave)
      • Set unit_type_var_two[2] = Small Treant (Wave)
      • Set unit_type_var_three[2] = Evil Sapling (Wave)
      • Set unit_amount[2] = 8
      • Set unit_amount_var_two[2] = 3
      • Set unit_amount_var_three[2] = 4
      • -------- Level 3 --------
      • Set unit_type[3] = Evil Sapling (Wave)
      • Set unit_type_var_two[3] = Small Treant (Wave)
      • Set unit_type_var_three[3] = Poison Spider (Wave)
      • Set unit_amount[3] = 8
      • Set unit_amount_var_two[3] = 3
      • Set unit_amount_var_three[3] = 4
      • -------- Level 4 --------
      • Set unit_type[4] = Evil Sapling (Wave)
      • Set unit_type_var_two[4] = Small Treant (Wave)
      • Set unit_type_var_three[4] = Evil Sapling (Wave)
      • Set unit_amount[4] = 4
      • Set unit_amount_var_two[4] = 5
      • Set unit_amount_var_three[4] = 6
      • -------- Level 5 --------
      • Set unit_type[5] = Small Treant (Wave)
      • Set unit_type_var_two[5] = Poison Spider (Wave)
      • Set unit_type_var_three[5] = Claw Beast (Wave)
      • Set unit_amount[5] = 7
      • Set unit_amount_var_two[5] = 6
      • Set unit_amount_var_three[5] = 2
      • -------- Level 6 --------
      • Set unit_type[6] = Small Treant (Wave)
      • Set unit_type_var_two[6] = Poison Spider (Wave)
      • Set unit_type_var_three[6] = Claw Beast (Wave)
      • Set unit_amount[6] = 6
      • Set unit_amount_var_two[6] = 6
      • Set unit_amount_var_three[6] = 3
      • -------- Level 7 --------
      • Set unit_type[7] = Small Treant (Wave)
      • Set unit_type_var_two[7] = Poison Spider (Wave)
      • Set unit_type_var_three[7] = Claw Beast (Wave)
      • Set unit_amount[7] = 4
      • Set unit_amount_var_two[7] = 4
      • Set unit_amount_var_three[7] = 7
Spawn Disable when special units are killed:
  • Spawn Disable
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dying unit) Equal to Corrupted Fountain 0022 <gen>
        • Then - Actions
          • Set loc[1] = loc[0]
          • Set West_timerout = (West_timerout - 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying unit) Equal to Corrupted Fountain 0040 <gen>
            • Then - Actions
              • Set loc[2] = loc[0]
              • Set West_timerout = (West_timerout - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Dying unit) Equal to Corrupted Deepwater-Shrine 0047 <gen>
                • Then - Actions
                  • Set loc[1] = loc[0]
                  • Set West_timerout = (West_timerout - 1)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Dying unit) Equal to Corrupted Deepwater-Shrine 0048 <gen>
                    • Then - Actions
                      • Set loc[2] = loc[0]
                      • Set West_timerout = (West_timerout - 1)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Dying unit) Equal to Corrupted Frost-Temple 0054 <gen>
                        • Then - Actions
                          • Set loc[1] = loc[0]
                          • Set West_timerout = (West_timerout - 1)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Dying unit) Equal to Corrupted Frost-Temple 0060 <gen>
                            • Then - Actions
                              • Set loc[2] = loc[0]
                              • Set West_timerout = (West_timerout - 1)
                            • Else - Actions
                              • Do nothing
Timer Stop when Region is cleared:
  • Clock Disable
    • Events
      • Unit - A unit Dies
    • Conditions
      • West_timerout Equal to 0
    • Actions
      • Countdown Timer - Pause Timer
      • Set West_timerout = 2
an last but not least,
one of the Gate Triggers:
  • West 1
    • Events
      • Unit - A unit enters West Gate 1 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Life of Corrupted Fountain 0040 <gen>) Equal to 0.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Entering unit) has an item of type Divemaster Key) Equal to True
            • Then - Actions
              • Item - Remove (Item carried by (Entering unit) of type Divemaster Key)
              • Destructible - Open Massive Ruined Gate (Horizontal) 0324 <gen>
              • Unit - Move Castle 0000 <gen> instantly to (Center of West Casstle 2 <gen>)
              • Trigger - Turn on Region 2 Set up <gen>
              • Trigger - Turn off East camp spawn 1 <gen>
              • Trigger - Turn on East camp spawn 2 <gen>
              • Countdown Timer - Start Timer as a Repeating timer that will expire in 60.00 seconds
              • Set loc[1] = (Center of West Side 2 <gen>)
              • Set loc[2] = (Center of West Main 2 <gen>)
              • Trigger - Turn off (This trigger)
            • Else - Actions
              • Game - Display to (All allies of Player 1 (Red)) the text: You need a Key to O...
        • Else - Actions
          • Game - Display to (All allies of Player 1 (Red)) the text: You Need to Destroy...
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Never use integer a/b. Use your own custom integer.

Never use entering unit. Use triggering unit.

You leak locations and any location used for the entire game should be stored into a permanent variable and never destroyed / changed. Use that variate for the whole game.

Never use waits. That is most likely your problem but it is hard to tell as you posted every trigger. I only need the triggers that correspond to the waves for team 1 / 2. The setup and the spawn triggers. Not what determined the enemies for these.
 
Level 7
Joined
Sep 19, 2012
Messages
204
Never use integer a/b. Use your own custom integer.

Never use entering unit. Use triggering unit.

You leak locations and any location used for the entire game should be stored into a permanent variable and never destroyed / changed. Use that variate for the whole game.

Never use waits. That is most likely your problem but it is hard to tell as you posted every trigger. I only need the triggers that correspond to the waves for team 1 / 2. The setup and the spawn triggers. Not what determined the enemies for these.

I know the triggers leak...i just want to get them running first then i can think about stopping leaks.

why shouldt i use entering unit? does it still work as i want it to, when i set triggering unit instead of entering?

the waits have been there from tutorial...any ideas how to replace them?

EDIT: Forgot the Triggers XD , i changed them due to some problems....
Team 1 Spawn
  • Spawn
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Set lvl_Display = (lvl_Display + 1)
      • Game - Display to (All allies of Player 1 (Red)) the text: (|c00999900Round + (|c00990000 + ((String(lvl_Display)) + (|r + |c00999900has started!|r))))
      • For each (Integer A) from 1 to unit_amount[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_two[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_two[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type_var_two[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_three[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_three[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type_var_three[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
Team 2 Spawn:
  • Spawn e
    • Events
      • Time - Timer2 expires
    • Conditions
    • Actions
      • Set lvl_Display_e = (lvl_Display_e + 1)
      • Game - Display to (All allies of Player 6 (Orange)) the text: (|c00999900Round + (|c00990000 + ((String(lvl_Display)) + (|r + |c00999900has started!|r))))
      • For each (Integer A) from 1 to unit_amount[lvlnum_e], do (Actions)
        • Loop - Actions
          • Set incrementx_e = 1
          • Set incrementy_e = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type[lvlnum_e] for Player 12 (Brown) at loc_e[incrementy_e] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Unit - Create 1 unit_type[lvlnum_e] for Player 12 (Brown) at loc_e[(incrementy_e + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Set incrementx_e = (incrementx_e + 1)
              • Set incrementy_e = (incrementy_e + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_two[lvlnum_e], do (Actions)
        • Loop - Actions
          • Set incrementx_e = 1
          • Set incrementy_e = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_two[lvlnum_e] for Player 12 (Brown) at loc_e[incrementy_e] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Unit - Create 1 unit_type_var_two[lvlnum_e] for Player 12 (Brown) at loc_e[(incrementy_e + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Set incrementx_e = (incrementx_e + 1)
              • Set incrementy_e = (incrementy_e + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_three[lvlnum_e], do (Actions)
        • Loop - Actions
          • Set incrementx_e = 1
          • Set incrementy_e = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_three[lvlnum_e] for Player 12 (Brown) at loc_e[incrementy_e] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Unit - Create 1 unit_type_var_three[lvlnum_e] for Player 12 (Brown) at loc_e[(incrementy_e + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Set incrementx_e = (incrementx_e + 1)
              • Set incrementy_e = (incrementy_e + 2)
          • Wait 0.75 seconds
 
Last edited:
Level 7
Joined
Sep 19, 2012
Messages
204
ok....i see. This makes the trigger more efficient, but i still have the problem that it doesnt work as i want it to :eekani:

it only spawns units on the east side. when i turn of the timer for the east it spawns the units on the west side, but obviously not the ones on the east side.

i could easily solve this problem by using only one timer and one spawn trigger, but i want 2 timers, for gameplay reasons.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Never create multiple units at the same time at the same location as this puts a huge strain on system resources as it tries to displace the units. Either stagger the spawning over a length of time or try and find unique places to spawn units that will not collide with other units.
 
Level 7
Joined
Sep 19, 2012
Messages
204
Never create multiple units at the same time at the same location as this puts a huge strain on system resources as it tries to displace the units. Either stagger the spawning over a length of time or try and find unique places to spawn units that will not collide with other units.

Units spawn every 0.75 seconds, so they dont block each other, also my problem is completely different. i have 2 spawns on different sides of the map but for some reason only one spawn works.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
You are leaking a lot of locations which can result in poor map performance (yes sorry WC3 is annoying in that way). Every location you create you need to destroy after it is no longer useful or it will leak.

Do both triggers run? The trigger that starts the timers appears to be missing (or I cannot find it, that happens from time to time).
 
Level 7
Joined
Sep 19, 2012
Messages
204
You are leaking a lot of locations which can result in poor map performance (yes sorry WC3 is annoying in that way). Every location you create you need to destroy after it is no longer useful or it will leak.

Do both triggers run? The trigger that starts the timers appears to be missing (or I cannot find it, that happens from time to time).

hehe...its possible that i didnt post it XD
the triggers should both run...as i said when only west timer is on it spawns in the west but when i turn on the east one west stops spawning...

so here are ALL Triggers that are related to spawning in ANY way ^^
Init. Triggers:
  • wave loc init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set loc[1] = (Center of West Side 1 <gen>)
      • Set loc[2] = (Center of West Main 1 <gen>)
      • Set loc_e[1] = (Center of East Side 1 <gen>)
      • Set loc_e[2] = (Center of East Main 1 <gen>)
  • Lvlnum init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set lvlnum = (lvlnum + 1)
      • Set lvlnum_e = (lvlnum_e + 1)
the Triggers that actually Spawn things:
  • Spawn
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Set lvl_Display = (lvl_Display + 1)
      • Game - Display to (All allies of Player 1 (Red)) the text: (|c00999900Round + (|c00990000 + ((String(lvl_Display)) + (|r + |c00999900has started!|r))))
      • For each (Integer A) from 1 to unit_amount[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_two[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_two[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type_var_two[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_three[lvlnum], do (Actions)
        • Loop - Actions
          • Set incrementx = 1
          • Set incrementy = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_three[lvlnum] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Unit - Create 1 unit_type_var_three[lvlnum] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0000 <gen>)
              • Set incrementx = (incrementx + 1)
              • Set incrementy = (incrementy + 2)
          • Wait 0.75 seconds
  • Spawn e
    • Events
      • Time - Timer2 expires
    • Conditions
    • Actions
      • Set lvl_Display_e = (lvl_Display_e + 1)
      • Game - Display to (All allies of Player 6 (Orange)) the text: (|c00999900Round + (|c00990000 + ((String(lvl_Display)) + (|r + |c00999900has started!|r))))
      • For each (Integer A) from 1 to unit_amount[lvlnum_e], do (Actions)
        • Loop - Actions
          • Set incrementx_e = 1
          • Set incrementy_e = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type[lvlnum_e] for Player 12 (Brown) at loc_e[incrementy_e] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Unit - Create 1 unit_type[lvlnum_e] for Player 12 (Brown) at loc_e[(incrementy_e + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Set incrementx_e = (incrementx_e + 1)
              • Set incrementy_e = (incrementy_e + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_two[lvlnum_e], do (Actions)
        • Loop - Actions
          • Set incrementx_e = 1
          • Set incrementy_e = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_two[lvlnum_e] for Player 12 (Brown) at loc_e[incrementy_e] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Unit - Create 1 unit_type_var_two[lvlnum_e] for Player 12 (Brown) at loc_e[(incrementy_e + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Set incrementx_e = (incrementx_e + 1)
              • Set incrementy_e = (incrementy_e + 2)
          • Wait 0.75 seconds
      • For each (Integer A) from 1 to unit_amount_var_three[lvlnum_e], do (Actions)
        • Loop - Actions
          • Set incrementx_e = 1
          • Set incrementy_e = 1
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 unit_type_var_three[lvlnum_e] for Player 12 (Brown) at loc_e[incrementy_e] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Unit - Create 1 unit_type_var_three[lvlnum_e] for Player 12 (Brown) at loc_e[(incrementy_e + 1)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Attack-Move To (Position of Castle 0001 <gen>)
              • Set incrementx_e = (incrementx_e + 1)
              • Set incrementy_e = (incrementy_e + 2)
          • Wait 0.75 seconds
the Setup for what is Spawned:
  • Var
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Level 1 --------
      • Set unit_type[1] = Evil Sapling (Wave)
      • Set unit_type_var_two[1] = Evil Sapling (Wave)
      • Set unit_type_var_three[1] = Evil Sapling (Wave)
      • Set unit_amount[1] = 8
      • Set unit_amount_var_two[1] = 4
      • Set unit_amount_var_three[1] = 3
      • Set lvlnum = 0
      • -------- Level 2 --------
      • Set unit_type[2] = Evil Sapling (Wave)
      • Set unit_type_var_two[2] = Small Treant (Wave)
      • Set unit_type_var_three[2] = Evil Sapling (Wave)
      • Set unit_amount[2] = 8
      • Set unit_amount_var_two[2] = 3
      • Set unit_amount_var_three[2] = 4
      • -------- Level 3 --------
      • Set unit_type[3] = Evil Sapling (Wave)
      • Set unit_type_var_two[3] = Small Treant (Wave)
      • Set unit_type_var_three[3] = Poison Spider (Wave)
      • Set unit_amount[3] = 8
      • Set unit_amount_var_two[3] = 3
      • Set unit_amount_var_three[3] = 4
      • -------- Level 4 --------
      • Set unit_type[4] = Evil Sapling (Wave)
      • Set unit_type_var_two[4] = Small Treant (Wave)
      • Set unit_type_var_three[4] = Poison Spider (Wave)
      • Set unit_amount[4] = 4
      • Set unit_amount_var_two[4] = 5
      • Set unit_amount_var_three[4] = 6
      • -------- Level 5 --------
      • Set unit_type[5] = Small Treant (Wave)
      • Set unit_type_var_two[5] = Poison Spider (Wave)
      • Set unit_type_var_three[5] = Claw Beast (Wave)
      • Set unit_amount[5] = 7
      • Set unit_amount_var_two[5] = 6
      • Set unit_amount_var_three[5] = 2
      • -------- Level 6 --------
      • Set unit_type[6] = Small Treant (Wave)
      • Set unit_type_var_two[6] = Poison Spider (Wave)
      • Set unit_type_var_three[6] = Claw Beast (Wave)
      • Set unit_amount[6] = 6
      • Set unit_amount_var_two[6] = 6
      • Set unit_amount_var_three[6] = 3
      • -------- Level 7 --------
      • Set unit_type[7] = Small Treant (Wave)
      • Set unit_type_var_two[7] = Poison Spider (Wave)
      • Set unit_type_var_three[7] = Claw Beast (Wave)
      • Set unit_amount[7] = 4
      • Set unit_amount_var_two[7] = 4
      • Set unit_amount_var_three[7] = 7
      • -------- Level 8 --------
      • Set unit_type[8] = Mur´gul (Wave)
      • Set unit_type_var_two[8] = Mur´gul (Wave)
      • Set unit_type_var_three[8] = Mur´gul (Wave)
      • Set unit_amount[8] = 8
      • Set unit_amount_var_two[8] = 4
      • Set unit_amount_var_three[8] = 3
      • -------- Level 9 --------
      • Set unit_type[9] = Mur´gul (Wave)
      • Set unit_type_var_two[9] = Naga Guard (Wave)
      • Set unit_type_var_three[9] = Mur´gul (Wave)
      • Set unit_amount[9] = 8
      • Set unit_amount_var_two[9] = 3
      • Set unit_amount_var_three[9] = 4
      • -------- Level 10 --------
      • Set unit_type[10] = Mur´gul (Wave)
      • Set unit_type_var_two[10] = Naga Guard (Wave)
      • Set unit_type_var_three[10] = Naga Archer (Wave)
      • Set unit_amount[10] = 8
      • Set unit_amount_var_two[10] = 3
      • Set unit_amount_var_three[10] = 4
      • -------- Level 11 --------
      • Set unit_type[11] = Mur´gul (Wave)
      • Set unit_type_var_two[11] = Naga Guard (Wave)
      • Set unit_type_var_three[11] = Naga Archer (Wave)
      • Set unit_amount[11] = 4
      • Set unit_amount_var_two[11] = 5
      • Set unit_amount_var_three[11] = 6
      • -------- Level 12 --------
      • Set unit_type[12] = Naga Guard (Wave)
      • Set unit_type_var_two[12] = Naga Archer (Wave)
      • Set unit_type_var_three[12] = Hydra (Wave)
      • Set unit_amount[12] = 7
      • Set unit_amount_var_two[12] = 6
      • Set unit_amount_var_three[12] = 2
      • -------- Level 13 --------
      • Set unit_type[13] = Naga Guard (Wave)
      • Set unit_type_var_two[13] = Naga Archer (Wave)
      • Set unit_type_var_three[13] = Hydra (Wave)
      • Set unit_amount[13] = 6
      • Set unit_amount_var_two[13] = 6
      • Set unit_amount_var_three[13] = 3
      • -------- Level 14 --------
      • Set unit_type[14] = Naga Guard (Wave)
      • Set unit_type_var_two[14] = Naga Archer (Wave)
      • Set unit_type_var_three[14] = Hydra (Wave)
      • Set unit_amount[14] = 4
      • Set unit_amount_var_two[14] = 4
      • Set unit_amount_var_three[14] = 7
      • -------- Level 15 --------
      • Set unit_type[15] = Evil Sapling (Wave)
      • Set unit_type_var_two[15] = Evil Sapling (Wave)
      • Set unit_type_var_three[15] = Evil Sapling (Wave)
      • Set unit_amount[15] = 8
      • Set unit_amount_var_two[15] = 4
      • Set unit_amount_var_three[15] = 3
      • -------- Level 16 --------
      • Set unit_type[16] = Evil Sapling (Wave)
      • Set unit_type_var_two[16] = Small Treant (Wave)
      • Set unit_type_var_three[16] = Evil Sapling (Wave)
      • Set unit_amount[16] = 8
      • Set unit_amount_var_two[16] = 3
      • Set unit_amount_var_three[16] = 4
      • -------- Level 17 --------
      • Set unit_type[17] = Evil Sapling (Wave)
      • Set unit_type_var_two[17] = Small Treant (Wave)
      • Set unit_type_var_three[17] = Poison Spider (Wave)
      • Set unit_amount[17] = 8
      • Set unit_amount_var_two[17] = 3
      • Set unit_amount_var_three[17] = 4
      • -------- Level 18 --------
      • Set unit_type[18] = Evil Sapling (Wave)
      • Set unit_type_var_two[18] = Small Treant (Wave)
      • Set unit_type_var_three[18] = Poison Spider (Wave)
      • Set unit_amount[18] = 4
      • Set unit_amount_var_two[18] = 5
      • Set unit_amount_var_three[18] = 6
      • -------- Level 19 --------
      • Set unit_type[19] = Small Treant (Wave)
      • Set unit_type_var_two[19] = Poison Spider (Wave)
      • Set unit_type_var_three[19] = Claw Beast (Wave)
      • Set unit_amount[19] = 7
      • Set unit_amount_var_two[19] = 6
      • Set unit_amount_var_three[19] = 2
      • -------- Level 20 --------
      • Set unit_type[20] = Small Treant (Wave)
      • Set unit_type_var_two[20] = Poison Spider (Wave)
      • Set unit_type_var_three[20] = Claw Beast (Wave)
      • Set unit_amount[20] = 6
      • Set unit_amount_var_two[20] = 6
      • Set unit_amount_var_three[20] = 3
      • -------- Level 21 --------
      • Set unit_type[21] = Small Treant (Wave)
      • Set unit_type_var_two[21] = Poison Spider (Wave)
      • Set unit_type_var_three[21] = Claw Beast (Wave)
      • Set unit_amount[21] = 4
      • Set unit_amount_var_two[21] = 4
      • Set unit_amount_var_three[21] = 7
The Timers:
  • Clock
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start Timer as a Repeating timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title West Wave
      • Set Timer = (Last started timer)
      • Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • Set Timer = (Last started timer)
      • Countdown Timer - Show (Last created timer window)
  • Clock e
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start Timer2 as a Repeating timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title East Wave
      • Set Timer = (Last started timer)
      • Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • Set Timer = (Last started timer)
      • Countdown Timer - Show (Last created timer window)
The ones that make Waves Stronger (increase lvl):
  • Wave Increase
    • Events
      • Time - Timer expires
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • lvl_Display Equal to 4
          • lvl_Display Equal to 9
          • lvl_Display Equal to 15
          • lvl_Display Equal to 19
          • lvl_Display Equal to 24
          • lvl_Display Equal to 29
    • Actions
      • Set lvlnum = (lvlnum + 1)
      • Game - Display to (All allies of Player 1 (Red)) the text: |c00FF0000Waves are...
  • Wave Increase e
    • Events
      • Time - Timer2 expires
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • lvl_Display_e Equal to 5
          • lvl_Display_e Equal to 10
          • lvl_Display_e Equal to 15
          • lvl_Display_e Equal to 20
          • lvl_Display_e Equal to 25
          • lvl_Display_e Equal to 30
    • Actions
      • Set lvlnum_e = (lvlnum_e + 1)
      • Game - Display to (All allies of Player 6 (Orange)) the text: |c00FF0000Waves are...
Disables Spawn when certain units are killed:
  • Spawn Disable
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Wait 0.75 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dying unit) Equal to Corrupted Fountain 0022 <gen>
        • Then - Actions
          • Set loc[1] = loc[0]
          • Trigger - Run Clock Disable <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying unit) Equal to Corrupted Fountain 0040 <gen>
            • Then - Actions
              • Set loc[2] = loc[0]
              • Trigger - Run Clock Disable <gen> (checking conditions)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Dying unit) Equal to Corrupted Deepwater-Shrine 0047 <gen>
                • Then - Actions
                  • Set loc[1] = loc[0]
                  • Trigger - Run Clock Disable <gen> (checking conditions)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Dying unit) Equal to Corrupted Deepwater-Shrine 0048 <gen>
                    • Then - Actions
                      • Set loc[2] = loc[0]
                      • Trigger - Run Clock Disable <gen> (checking conditions)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Dying unit) Equal to Corrupted Frost-Temple 0054 <gen>
                        • Then - Actions
                          • Set loc[1] = loc[0]
                          • Trigger - Run Clock Disable <gen> (checking conditions)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Dying unit) Equal to Corrupted Frost-Temple 0060 <gen>
                            • Then - Actions
                              • Set loc[2] = loc[0]
                              • Trigger - Run Clock Disable <gen> (checking conditions)
                            • Else - Actions
                              • Do nothing
  • Spawn Disable e
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Wait 0.75 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dying unit) Equal to Corrupted Fountain 0073 <gen>
        • Then - Actions
          • Set loc_e[1] = loc_e[0]
          • Trigger - Run Clock Disable e <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying unit) Equal to Corrupted Fountain 0074 <gen>
            • Then - Actions
              • Set loc_e[2] = loc_e[0]
              • Trigger - Run Clock Disable e <gen> (checking conditions)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Dying unit) Equal to Corrupted Deepwater-Shrine 0078 <gen>
                • Then - Actions
                  • Set loc_e[1] = loc_e[0]
                  • Trigger - Run Clock Disable e <gen> (checking conditions)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Dying unit) Equal to Corrupted Deepwater-Shrine 0079 <gen>
                    • Then - Actions
                      • Set loc_e[2] = loc_e[0]
                      • Trigger - Run Clock Disable e <gen> (checking conditions)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Dying unit) Equal to Corrupted Frost-Temple 0085 <gen>
                        • Then - Actions
                          • Set loc_e[1] = loc_e[0]
                          • Trigger - Run Clock Disable e <gen> (checking conditions)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Dying unit) Equal to Corrupted Frost-Temple 0088 <gen>
                            • Then - Actions
                              • Set loc_e[2] = loc_e[0]
                              • Trigger - Run Clock Disable e <gen> (checking conditions)
                            • Else - Actions
                              • Do nothing
Pauses the Clock when area is cleared:
  • Clock Disable
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Life of clockstop1) Equal to 0.00
          • (Life of clockstop2) Equal to 0.00
    • Actions
      • Countdown Timer - Pause Timer
  • Clock Disable e
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Life of clockstop1_e) Equal to 0.00
          • (Life of clockstop2_e) Equal to 0.00
    • Actions
      • Countdown Timer - Pause Timer2
and one of the Gate triggers/ setup for next area:
  • West 1
    • Events
      • Unit - A unit enters West Gate 1 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Life of Corrupted Fountain 0040 <gen>) Equal to 0.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Entering unit) has an item of type Divemaster Key) Equal to True
            • Then - Actions
              • Item - Remove (Item carried by (Entering unit) of type Divemaster Key)
              • Destructible - Open Massive Ruined Gate (Horizontal) 0324 <gen>
              • Unit - Move Castle 0000 <gen> instantly to (Center of West Casstle 2 <gen>)
              • Trigger - Turn off East camp spawn 1 <gen>
              • Trigger - Turn on East camp spawn 2 <gen>
              • Countdown Timer - Start Timer as a Repeating timer that will expire in 60.00 seconds
              • Set lvl_Display = 0
              • Set lvlnum = 8
              • Set loc[1] = (Center of West Side 2 <gen>)
              • Set loc[2] = (Center of West Main 2 <gen>)
              • Set clockstop1 = Corrupted Deepwater-Shrine 0047 <gen>
              • Set clockstop2 = Corrupted Deepwater-Shrine 0048 <gen>
              • Trigger - Turn off (This trigger)
            • Else - Actions
              • Game - Display to (All allies of Player 1 (Red)) the text: You need a Key to O...
        • Else - Actions
          • Game - Display to (All allies of Player 1 (Red)) the text: You Need to Destroy...
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
The following makes no sense...
  • Clock
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start Timer as a Repeating timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title West Wave
      • Set Timer = (Last started timer)
      • Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • Set Timer = (Last started timer)
      • Countdown Timer - Show (Last created timer window)
  • Clock e
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start Timer2 as a Repeating timer that will expire in 60.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title East Wave
      • Set Timer = (Last started timer)
      • Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
      • Set Timer = (Last started timer)
      • Countdown Timer - Show (Last created timer window)
Both overwrite the value in timer. This means that if the "Clock e" trigger was to run before the "Clock" trigger then it will break very badly as both will be starting the timer located in "Timer2" and the timer in "Timer" will have leaked (no longer any references to it, all events made with it cannot ever fire). Since you are using GUI timers do not alter the contents of timer variables for the following reasons.
1. Timer events are attached to the timer objects and not the variable so changing the variable will not change the timer the event uses.
2. All variables are assigned an initial value of a unique timer object. Changing that value can potentially leak a timer unless the existing one is destroyed.

Remove the "Set Timer = (Last started timer)" lines and hopefully stuff will work much better!
 
Level 7
Joined
Sep 19, 2012
Messages
204
The following makes no sense...

Both overwrite the value in timer. This means that if the "Clock e" trigger was to run before the "Clock" trigger then it will break very badly as both will be starting the timer located in "Timer2" and the timer in "Timer" will have leaked (no longer any references to it, all events made with it cannot ever fire). Since you are using GUI timers do not alter the contents of timer variables for the following reasons.
1. Timer events are attached to the timer objects and not the variable so changing the variable will not change the timer the event uses.
2. All variables are assigned an initial value of a unique timer object. Changing that value can potentially leak a timer unless the existing one is destroyed.

Remove the "Set Timer = (Last started timer)" lines and hopefully stuff will work much better!


thank you very much...removing those lines worked very well :)
Leaks etc will be fixed later...this is going to be a lot of work i think and i want to get a running prototype done first. +rep
 
Status
Not open for further replies.
Top