• 🏆 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] Bugged Triggers! Yay!

Status
Not open for further replies.
Level 4
Joined
Jul 3, 2008
Messages
35
I have another issue with one of my triggers. This trigger is called by another and works perfectly until wave 24. The boss on that wave does not spawn until wave 30 and pushes the wave 30 and 36 bosses back 6 waves. It isn't a problem with the array, triple checked that, and i cant figure out why it isnt working, so any help is appreciated.

  • Spawn
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (unit_count mod 6) Not equal to 0
        • Then - Actions
          • Countdown Timer - Start next_wave_timer as a One-shot timer that will expire in 40.00 seconds
          • Countdown Timer - Create a timer window for (Last started timer) with title Next Wave In:
          • For each (Integer Int_Count1) from 1 to 20, do (Actions)
            • Loop - Actions
              • Set LeakLocation = (Center of Top Spawn <gen>)
              • Unit - Create 1 unit[unit_count] for Player 7 (Green) at LeakLocation facing Default building facing degrees
              • Set LeakLocation = (Center of To Top <gen>)
              • Unit - Order (Last created unit) to Move To LeakLocation
              • Set LeakLocation = (Center of Middle Spawn <gen>)
              • Unit - Create 1 unit[unit_count] for Player 7 (Green) at LeakLocation facing Default building facing degrees
              • Set LeakLocation = (Center of Split <gen>)
              • Unit - Order (Last created unit) to Move To LeakLocation
              • Set LeakLocation = (Center of Bottom Spawn <gen>)
              • Unit - Create 1 unit[unit_count] for Player 7 (Green) at LeakLocation facing Default building facing degrees
              • Set LeakLocation = (Center of To Bottom <gen>)
              • Unit - Order (Last created unit) to Move To LeakLocation
              • Wait 0.50 seconds
          • Set unit_count = (unit_count + 1)
        • Else - Actions
          • For each (Integer Int_Count1_Copy) from 1 to 1, do (Actions)
            • Loop - Actions
              • Set LeakLocation = (Center of Top Spawn <gen>)
              • Unit - Create 1 Boss_unit[boss_unit_count] for Player 7 (Green) at LeakLocation facing Default building facing degrees
              • Set LeakLocation = (Center of To Top <gen>)
              • Unit - Order (Last created unit) to Move To LeakLocation
              • Set LeakLocation = (Center of Middle Spawn <gen>)
              • Unit - Create 1 Boss_unit[boss_unit_count] for Player 7 (Green) at LeakLocation facing Default building facing degrees
              • Set LeakLocation = (Center of Split <gen>)
              • Unit - Order (Last created unit) to Move To LeakLocation
              • Set LeakLocation = (Center of Bottom Portal <gen>)
              • Unit - Create 1 Boss_unit[boss_unit_count] for Player 7 (Green) at LeakLocation facing Default building facing degrees
              • Set LeakLocation = (Center of To Bottom <gen>)
              • Unit - Order (Last created unit) to Move To LeakLocation
              • Wait 0.50 seconds
          • Set boss_unit_count = (boss_unit_count + 1)
          • Set unit_count = (unit_count + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • unit_count Equal to 36
            • Then - Actions
              • Trigger - Turn on End Game <gen>
            • Else - Actions
              • Countdown Timer - Start next_wave_timer as a One-shot timer that will expire in 40.00 seconds
              • Countdown Timer - Create a timer window for (Last started timer) with title Next Wave In:
      • Custom script: call RemoveLocation(udg_LeakLocation)
 
Level 8
Joined
Aug 4, 2006
Messages
357
Idk what the problem is, but you leak a hell of a lot of locations. You need to call RemoveLocation on each location after you're done using it. You need to RemoveLocation(udg_LeakLocation) before each time you reset LeakLocation. Otherwise, the old locations that used to be stored in LeakLocation will no longer have references and just be floating around in memory, resulting in leaks.
 
Status
Not open for further replies.
Top