• 🏆 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 help! Why the timer runs twice. HELP

Status
Not open for further replies.
Level 3
Joined
Jan 16, 2011
Messages
44
Why the round timer runs after timer initialize end zero then after releasing the spawn creeps of round timer that will be the time the he will destroy the timer and not after timer initialize ends . Where the event of round timer is when ROUND timer expires that was created by timer initialize but round timer has the condition after all creeps of player 12 died and that will be the time he will create his timer.
Any fix for this.. Sorry im not still new to world editor.


  • Timer Initialize
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Countdown started. ...
      • Countdown Timer - Start RoundWindow as a One-shot timer that will expire in 10.00 seconds
      • Set RoundWindow = (Last started timer)
      • Countdown Timer - Create a timer window for (Last started timer) with title (Enemy Wave + ((String((lvlnum + 1))) + in: ))
      • Player Group - Pick every player in (All players) and do (Countdown Timer - Show (Last created timer window) for (Picked player))
  • Round Timer expire
    • Events
      • Time - RoundWindow expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy (Last created timer window)
      • Wait until ((All units of (Units owned by Player 12 (Brown)) are dead) Equal to True), checking every 1.00 seconds
      • Game - Display to (All players) the text: (|c00999900Round + (|c00990000 + ((String((lvlnum + 1))) + (|r + |c00999900has started!|r))))
      • Player Group - Pick every player in (All players) and do (Countdown Timer - Hide (Last created timer window) for (Picked player))
      • Game - Display to (All players) the text: Countdown Started f...
      • Countdown Timer - Start RoundWindow as a One-shot timer that will expire in 13.00 seconds
      • Set RoundWindow = (Last started timer)
      • Countdown Timer - Create a timer window for (Last started timer) with title (Enemy Wave + ((String((lvlnum + 1))) + in: ))
      • Player Group - Pick every player in (All players) and do (Countdown Timer - Show (Last created timer window) for (Picked player))

  • Spawn Copy
    • Events
      • Time - RoundWindow expires
    • Conditions
    • Actions
      • Set lvlnum = (lvlnum + 1)
      • Set loc[1] = (Center of topleft1 <gen>)
      • Set loc[2] = (Center of topleft2 <gen>)
      • Set loc[3] = (Center of topright1 <gen>)
      • Set loc[4] = (Center of topright2 <gen>)
      • Set loc[5] = (Center of bottomleft1 <gen>)
      • Set loc[6] = (Center of bottomleft2 <gen>)
      • Set loc[7] = (Center of jungle <gen>)
      • Set loc[8] = (Center of midmid <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 (Center of (Playable map area))
              • 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 (Center of (Playable map area))
              • 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 (Center of (Playable map area))
              • 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 (Center of (Playable map area))
              • 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 (Center of (Playable map area))
              • 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 (Center of (Playable map area))
              • 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 3
Joined
Jan 16, 2011
Messages
44
What trigger do you mean? I tried to add condition but still the same.

I tried Dead and empty in the condition.
  • Round Timer expire
    • Events
      • Time - roundwindow expires
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Countdown Timer - Hide (Last created timer window) for (Picked player))
      • Countdown Timer - Destroy (Last created timer window)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (All units of (Units owned by Player 12 (Brown)) are dead) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Countdown Started f...
          • Countdown Timer - Start roundwindow as a Repeating timer that will expire in 13.00 seconds
          • Set RoundWindow = (Last started timer)
          • Countdown Timer - Create a timer window for (Last started timer) with title (Enemy Wave + ((String((lvlnum + 1))) + in: ))
          • Game - Display to (All players) the text: (|c00999900Round + (|c00990000 + ((String((lvlnum + 1))) + (|r + |c00999900has started!|r))))
          • Player Group - Pick every player in (All players) and do (Countdown Timer - Show (Last created timer window) for (Picked player))
        • Else - Actions
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
This can cause bugs...

  • Wait until ((All units of (Units owned by Player 12 (Brown)) are dead) Equal to True), checking every 1.00 seconds
Not dead, but make unit groups/wave groups...everytime the moster spawns
add it to the unit group, if the monster dies, remove it from the unit group...

example
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (YOUR UNIT GROUP is empty) Equal to True
    • Then - Actions
      • Run your timer here
    • Else - Actions
 
Status
Not open for further replies.
Top