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

Unit Group Leaks

Status
Not open for further replies.
Level 9
Joined
Apr 28, 2006
Messages
187
Hi lads, any thoughts on how to fix the two unit group leaks in this trigger?

(Under conditions and under "remove summons")

  • HeroesLoseTEAM 1
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (Number of units in (Units in DuelUnitsCheckRegion <gen> matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to BossMonster))))) Equal to 0
    • Actions
      • -------- STOP BOSS FROM DYING FROM POSION ETC --------
      • Unit - Make BossMonster Invulnerable
      • Unit - Remove All buffs from BossMonster
      • -------- PLAYERS LOSE. SHUT DOWN DUEL (TEAM 1) --------
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off HeroesWinTEAM 1 <gen>
      • Trigger - Turn off DuelMusic <gen>
      • Trigger - Turn off Boss takes Damage <gen>
      • Trigger - Turn off BootOut TEAM2 <gen>
      • Leaderboard - Hide BossHealthLeaderboard
      • Leaderboard - Destroy BossHealthLeaderboard
      • Set BOSSDuelRunningT1 = False
      • Sound - Stop the currently playing music theme
      • Trigger - Run DuelDefeatMusic <gen> (checking conditions)
      • Game - Display to Team1 for 6.00 seconds the text: (|C0099CC99 + (You are not yet powerful enough to kill |r + (|c00FF0033Argonax|r + |C0099CC99! Only the strongest warriors have a chance to defeat him.|r)))
      • Game - Display to Team2 for 6.00 seconds the text: (|C0099CC99 + (The enemy team is has been defeated by |r + (|c00FF0033Argonax|r + |C0099CC99! Now is your chance to steal victory for yourselves!|r)))
      • -------- SHUT DOWN VISABILITY MODIFIER --------
      • Set BossDuelBeginsPoint = (Center of ArgonaxRestRegion <gen>)
      • Cinematic - Ping minimap for (All players) at BossDuelBeginsPoint for 6.00 seconds, using a Flashy ping of color (100.00%, 20.00%, 20.00%)
      • Custom script: call RemoveLocation(udg_BossDuelBeginsPoint)
      • -------- REMOVE ALL SUMMONABLES FROM DUELLING ARENA --------
      • Unit Group - Pick every unit in (Units in DuelUnitsCheckRegion <gen> matching ((((Matching unit) is A Hero) Equal to False) and ((Matching unit) Not equal to BossMonster))) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • -------- RESET ARGONAX --------
      • Unit - Set life of BossMonster to ((Real(BossHealthCurrent)) + (500.00 x (Real(GameDifficultyMode))))
      • Unit - Make BossMonster Vulnerable
      • Set BossDuelBeginsPoint = (Center of ArgonaxRestRegion <gen>)
      • Unit - Order BossMonster to Move To BossDuelBeginsPoint
      • Custom script: call RemoveLocation(udg_BossDuelBeginsPoint)
      • Wait 3.50 seconds
      • Unit - Make BossMonster face 270.00 over 0.50 seconds
      • Wait 0.50 seconds
      • Animation - Play BossMonster's victory animation
      • Wait 0.10 seconds
      • Sound - Play DemonRoar <gen> at 100.00% volume, attached to BossMonster
      • Unit - Pause BossMonster
      • -------- REMOVE FORCEFIELD --------
      • Destructible - Remove ForceField
      • Unit - Kill GateGuardian[1]
      • Unit - Kill GateGuardian[2]
      • Trigger - Turn on Unit Approches Final Door TEAM 1 <gen>
      • Trigger - Turn on Unit Approches Final Door TEAM 2 <gen>
 
Last edited:
What about using a variable which sets the groups ?
then use
  • Custom script: call DestroyGroup (udg_Groupname)
or create a local group, assign the group to your unit group and destroy them.

Don't listen to Heero, he wants you to do the trigger the longer way. The short and super easier way is to just put this on top of your group set:
  • Trigger
    • Events
    • Conditions
    • Actions
      • Custom Script: set bj_wantDestroyGroup = true
It takes less longer and prevents the leak. :wink:
 
Level 9
Joined
Apr 28, 2006
Messages
187
RESOLVED. -thanks fellas.

  • HeroesLoseTEAM 1
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set BossDuelHeroCheck = (Units in DuelUnitsCheckRegion <gen> matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and ((Matching unit) Not equal to BossMonster))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in BossDuelHeroCheck) Equal to 0
        • Then - Actions
          • Custom script: call DestroyGroup (udg_BossDuelHeroCheck)
          • -------- STOP BOSS FROM DYING FROM POSION ETC --------
          • Unit - Make BossMonster Invulnerable
          • Unit - Remove All buffs from BossMonster
          • -------- PLAYERS LOSE. SHUT DOWN DUEL (TEAM 1) --------
          • Trigger - Turn off (This trigger)
          • Trigger - Turn off HeroesWinTEAM 1 <gen>
          • Trigger - Turn off DuelMusic <gen>
          • Trigger - Turn off Boss takes Damage <gen>
          • Trigger - Turn off BootOut TEAM2 <gen>
          • Leaderboard - Hide BossHealthLeaderboard
          • Leaderboard - Destroy BossHealthLeaderboard
          • Set BOSSDuelRunningT1 = False
          • Sound - Stop the currently playing music theme
          • Trigger - Run DuelDefeatMusic <gen> (checking conditions)
          • Game - Display to Team1 for 8.00 seconds the text: (|C0099CC99 + (You are not yet powerful enough to kill |r + (|c00FF0033Argonax|r + |C0099CC99!|r)))
          • Game - Display to Team1 for 8.00 seconds the text: |C0099CC99Only the ...
          • Game - Display to Team2 for 8.00 seconds the text: (|C0099CC99 + (The enemy team is has been defeated by |r + (|c00FF0033Argonax|r + |C0099CC99!|r)))
          • -------- SHUT DOWN VISABILITY MODIFIER --------
          • Set BossDuelBeginsPoint = (Center of ArgonaxRestRegion <gen>)
          • Cinematic - Ping minimap for (All players) at BossDuelBeginsPoint for 6.00 seconds, using a Flashy ping of color (100.00%, 20.00%, 20.00%)
          • Custom script: call RemoveLocation(udg_BossDuelBeginsPoint)
          • -------- REMOVE ALL SUMMONABLES FROM DUELLING ARENA --------
          • Set BossDuelSummonsCheck = (Units in DuelUnitsCheckRegion <gen> matching (((Matching unit) Not equal to BossMonster) and (((Matching unit) is A Hero) Equal to False)))
          • Unit Group - Pick every unit in BossDuelSummonsCheck and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
          • Custom script: call DestroyGroup (udg_BossDuelSummonsCheck)
          • -------- RESET ARGONAX --------
          • Unit - Set life of BossMonster to ((Real(BossHealthCurrent)) + (500.00 x (Real(GameDifficultyMode))))
          • Unit - Make BossMonster Vulnerable
          • Set BossDuelBeginsPoint = (Center of ArgonaxRestRegion <gen>)
          • Unit - Order BossMonster to Move To BossDuelBeginsPoint
          • Custom script: call RemoveLocation(udg_BossDuelBeginsPoint)
          • Wait 3.50 seconds
          • Unit - Make BossMonster face 270.00 over 0.50 seconds
          • Wait 0.50 seconds
          • Animation - Play BossMonster's victory animation
          • Wait 0.10 seconds
          • Sound - Play DemonRoar <gen> at 100.00% volume, attached to BossMonster
          • Unit - Pause BossMonster
          • -------- REMOVE FORCEFIELD --------
          • Destructible - Remove ForceField
          • Unit - Kill GateGuardian[1]
          • Unit - Kill GateGuardian[2]
          • Trigger - Turn on Unit Approches Final Door TEAM 1 <gen>
          • Trigger - Turn on Unit Approches Final Door TEAM 2 <gen>
        • Else - Actions
          • Do nothing
 
Status
Not open for further replies.
Top