1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Unit Group Leaks

Discussion in 'Bug Reporting\Technical Issues' started by Steelb_l_ade, May 8, 2007.

  1. Steelb_l_ade

    Steelb_l_ade

    Joined:
    Apr 28, 2006
    Messages:
    188
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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: May 8, 2007
  2. Xarwin

    Xarwin

    Joined:
    Nov 16, 2006
    Messages:
    2,233
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    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.
     
  3. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,427
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    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:
     
  4. 1)ark_NiTe

    1)ark_NiTe

    Joined:
    Nov 1, 2006
    Messages:
    1,680
    Resources:
    5
    Maps:
    1
    Spells:
    3
    Tutorials:
    1
    Resources:
    5
    It will still leak, Pick Every Unit in Region is still a point I believe, and must be dealt with. I'll post more if anyone confirms this point. (Because I'm not 100% sure)
     
  5. Steelb_l_ade

    Steelb_l_ade

    Joined:
    Apr 28, 2006
    Messages:
    188
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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
     
  6. Xarwin

    Xarwin

    Joined:
    Nov 16, 2006
    Messages:
    2,233
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    If that was a joke, it sucked. Buf if it was sarcasm, that was worse.

    Steelblade, you're using a leakchecker ?
     
    Last edited: May 9, 2007
  7. Steelb_l_ade

    Steelb_l_ade

    Joined:
    Apr 28, 2006
    Messages:
    188
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Yes, leak Check ver 2. It's very useful!