About memory leak

meehael

New Member
Reaction score
6
Hi,

When I want to clean leaks by destroying Temp_Region, is it all right if I leave it like this (it contains other points and regions-in this case only one other point):
Code:
Set Temp_Region = (Region centered at (Position of MassTeleport) with size (320.00, 320.00))
Or I need to set each point and region to a variable and then remove them one by one, as in here:
Code:
Set Temp_Region = (Region centered at Temp_Point with size (320.00, 320.00))
Where Temp_Point = (Position of MassTeleport)

Thanks,
Regards!
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
if a point is to be re-used, but single register... then don't delete it.

but if a point is registered every time it is used.. then change it./delete it.

what gives...

just use..

units within 500 range of temp point..


etc.
 

wellwish3r

wishes wells.
Reaction score
52
another thing, here are the triggers blizzard used in the illidan map (this is for one team only)^^

Code:
Give Wagon to Maiev
    Events
        Time - Every 2.00 seconds of game time
    Conditions
        GameOver Equal to False
        InCinematic Equal to False
        (Owner of Wagon) Equal to P3_IllidanCage
        (Remaining time for TransferOwnerTimer) Less than or equal to 0.00
    Actions
        Set TempPointA = (Position of Wagon)
        Set TempPointB = (Position of Maiev)
        Set TempPointC = (Position of Kael)
        Set TempPointD = (Position of Vashj)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        (Maiev is alive) Equal to True
                        (Distance between TempPointA and TempPointB) Less than or equal to WagonControlRadius
                And - All (Conditions) are true
                    Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Kael is dead) Equal to True
                                (Distance between TempPointA and TempPointC) Greater than WagonControlRadius
                        Or - Any (Conditions) are true
                            Conditions
                                (Vashj is dead) Equal to True
                                (Distance between TempPointA and TempPointD) Greater than WagonControlRadius
            Then - Actions
                -------- Start TransferTimer --------
                Countdown Timer - Start TransferOwnerTimer as a One-shot timer that will expire in 5.00 seconds
                -------- Change Leaderboard --------
                Trigger - Run Change Board to Maiev <gen> (checking conditions)
                -------- Change Wagon Owner --------
                Countdown Timer - Pause WagonHeartbeat
                Unit - Change ownership of Wagon to P5_Maiev and Change color
                -------- Reset Timer Minimums --------
                Set NETimerMinimum = NETimerBaseMinimum
                Set BETimerMinimum = BETimerBaseMinimum
                -------- Reinitialize Wagon Guards --------
                Countdown Timer - Pause MaievOrderPulse
                Unit Group - Add Maiev to CaravanGuardsGroup
                Unit - Create 1 Huntress for P5_Maiev at (Center of NE Ancient of War Spawn 01 <gen>) facing 270.00 degrees
                Set CaravanHunt01 = (Last created unit)
                Unit Group - Add CaravanHunt01 to CaravanGuardsGroup
                Unit - Create 1 Archer for P5_Maiev at (Center of NE Ancient of War Spawn 02 <gen>) facing 270.00 degrees
                Set CaravanArcher01 = (Last created unit)
                Unit Group - Add CaravanArcher01 to CaravanGuardsGroup
                Unit - Create 1 Archer for P5_Maiev at (Center of NE Ancient of War Spawn 03 <gen>) facing 270.00 degrees
                Set CaravanArcher02 = (Last created unit)
                Unit Group - Add CaravanArcher02 to CaravanGuardsGroup
                Trigger - Run Init 09c Caravan Units <gen> (checking conditions)
                -------- Reinitialize Wagon Position Along Breadcrumbs --------
                Set ClosestRegionDistance = 1000000.00
                For each (Integer A) from 1 to (BreadcrumbTotal - 1), do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Distance between TempPointA and zBreadcrumbArray[(Integer A)]) Less than or equal to ClosestRegionDistance
                            Then - Actions
                                Set ClosestRegionDistance = (Distance between TempPointA and zBreadcrumbArray[(Integer A)])
                                Set BreadcrumbReached = (Integer A)
                                Set BreadcrumbCurrent = ((Integer A) + 1)
                            Else - Actions
                -------- Reorient the formation --------
                Set zReorientTarget = zBreadcrumbArray[BreadcrumbCurrent]
                Set ReorientAngle = BreadcrumbAngleArray[BreadcrumbCurrent]
                Trigger - Run Reorient Formation <gen> (checking conditions)
                -------- Resume Caravan Behavior --------
                Trigger - Run Caravan Orders Resume <gen> (checking conditions)
                -------- Acknowledge ownership change to player --------
                Trigger - Run Player Loses Wagon First Time <gen> (checking conditions)
                Trigger - Run Player Loses Wagon Subsequent Times <gen> (checking conditions)
            Else - Actions
        Custom script:   call RemoveLocation( udg_TempPointA )
        Custom script:   call RemoveLocation( udg_TempPointB )
        Custom script:   call RemoveLocation( udg_TempPointC )
        Custom script:   call RemoveLocation( udg_TempPointD )

Code:
Player Loses Wagon First Time
    Events
    Conditions
        ((This trigger) is on) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Trigger - Add Player Loses Wagon First Time Q <gen> to the trigger queue (Checking conditions)
        Wait 0.01 seconds
        Trigger - Turn on Player Loses Wagon Subsequent Times <gen>


Code:
Player Loses Wagon First Time Q
    Events
    Conditions
        GameOver Equal to False
    Actions
        Trigger - Turn off (This trigger)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Kael is alive) Equal to True
            Then - Actions
                Sound - Setup all volume channels for speech
                Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael19 <gen> and display Damn. We've lost th....  Modify duration: Add 0.00 seconds and Don't wait
                Wait for A05Kael19 <gen> to be 0.00 seconds from finished playing
                Sound - Reset all volume channels to 100%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Vashj is alive) Equal to True
            Then - Actions
                Sound - Setup all volume channels for speech
                Cinematic - Send transmission to (All players) from Vashj named Lady Vashj: Play A05LadyVashj20 <gen> and display There is still time....  Modify duration: Add 0.00 seconds and Don't wait
                Wait for A05LadyVashj20 <gen> to be 0.00 seconds from finished playing
                Sound - Reset all volume channels to 100%
            Else - Actions
        Trigger - Run Quest Secure Wagon Update Lost Wagon <gen> (checking conditions)
        Wait Campaign quest delay seconds
        Trigger - Remove (This trigger) from the trigger queue

Code:
Player Loses Wagon Subsequent Times
    Events
    Conditions
        ((This trigger) is on) Equal to True
    Actions
        Trigger - Add Player Loses Wagon Subsequent Times Q <gen> to the trigger queue (Checking conditions)

Code:
Player Loses Wagon Subsequent Times Q
    Events
    Conditions
        GameOver Equal to False
        (Kael is alive) Equal to True
    Actions
        Set RandomValue = (Random real number between 0.00 and 3.00)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RandomValue Less than or equal to 1.00
            Then - Actions
                Sound - Setup all volume channels for speech
                Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael21 <gen> and display They've retaken the....  Modify duration: Add 0.00 seconds and Don't wait
                Wait for A05Kael21 <gen> to be 0.00 seconds from finished playing
                Sound - Reset all volume channels to 100%
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        RandomValue Less than or equal to 2.00
                    Then - Actions
                        Sound - Setup all volume channels for speech
                        Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael22 <gen> and display The cage is lost! W....  Modify duration: Add 0.00 seconds and Don't wait
                        Wait for A05Kael22 <gen> to be 0.00 seconds from finished playing
                        Sound - Reset all volume channels to 100%
                    Else - Actions
                        Sound - Setup all volume channels for speech
                        Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael23 <gen> and display They're getting awa....  Modify duration: Add 0.00 seconds and Don't wait
                        Wait for A05Kael23 <gen> to be 0.00 seconds from finished playing
                        Sound - Reset all volume channels to 100%
        Trigger - Run Quest Secure Wagon Update Lost Wagon <gen> (checking conditions)
        Wait Campaign quest delay seconds
        Trigger - Remove (This trigger) from the trigger queue
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
another thing, here are the triggers blizzard used in the illidan map (this is for one team only)^^

Code:
Give Wagon to Maiev
    Events
        Time - Every 2.00 seconds of game time
    Conditions
        GameOver Equal to False
        InCinematic Equal to False
        (Owner of Wagon) Equal to P3_IllidanCage
        (Remaining time for TransferOwnerTimer) Less than or equal to 0.00
    Actions
        Set TempPointA = (Position of Wagon)
        Set TempPointB = (Position of Maiev)
        Set TempPointC = (Position of Kael)
        Set TempPointD = (Position of Vashj)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        (Maiev is alive) Equal to True
                        (Distance between TempPointA and TempPointB) Less than or equal to WagonControlRadius
                And - All (Conditions) are true
                    Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Kael is dead) Equal to True
                                (Distance between TempPointA and TempPointC) Greater than WagonControlRadius
                        Or - Any (Conditions) are true
                            Conditions
                                (Vashj is dead) Equal to True
                                (Distance between TempPointA and TempPointD) Greater than WagonControlRadius
            Then - Actions
                -------- Start TransferTimer --------
                Countdown Timer - Start TransferOwnerTimer as a One-shot timer that will expire in 5.00 seconds
                -------- Change Leaderboard --------
                Trigger - Run Change Board to Maiev <gen> (checking conditions)
                -------- Change Wagon Owner --------
                Countdown Timer - Pause WagonHeartbeat
                Unit - Change ownership of Wagon to P5_Maiev and Change color
                -------- Reset Timer Minimums --------
                Set NETimerMinimum = NETimerBaseMinimum
                Set BETimerMinimum = BETimerBaseMinimum
                -------- Reinitialize Wagon Guards --------
                Countdown Timer - Pause MaievOrderPulse
                Unit Group - Add Maiev to CaravanGuardsGroup
                Unit - Create 1 Huntress for P5_Maiev at (Center of NE Ancient of War Spawn 01 <gen>) facing 270.00 degrees
                Set CaravanHunt01 = (Last created unit)
                Unit Group - Add CaravanHunt01 to CaravanGuardsGroup
                Unit - Create 1 Archer for P5_Maiev at (Center of NE Ancient of War Spawn 02 <gen>) facing 270.00 degrees
                Set CaravanArcher01 = (Last created unit)
                Unit Group - Add CaravanArcher01 to CaravanGuardsGroup
                Unit - Create 1 Archer for P5_Maiev at (Center of NE Ancient of War Spawn 03 <gen>) facing 270.00 degrees
                Set CaravanArcher02 = (Last created unit)
                Unit Group - Add CaravanArcher02 to CaravanGuardsGroup
                Trigger - Run Init 09c Caravan Units <gen> (checking conditions)
                -------- Reinitialize Wagon Position Along Breadcrumbs --------
                Set ClosestRegionDistance = 1000000.00
                For each (Integer A) from 1 to (BreadcrumbTotal - 1), do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Distance between TempPointA and zBreadcrumbArray[(Integer A)]) Less than or equal to ClosestRegionDistance
                            Then - Actions
                                Set ClosestRegionDistance = (Distance between TempPointA and zBreadcrumbArray[(Integer A)])
                                Set BreadcrumbReached = (Integer A)
                                Set BreadcrumbCurrent = ((Integer A) + 1)
                            Else - Actions
                -------- Reorient the formation --------
                Set zReorientTarget = zBreadcrumbArray[BreadcrumbCurrent]
                Set ReorientAngle = BreadcrumbAngleArray[BreadcrumbCurrent]
                Trigger - Run Reorient Formation <gen> (checking conditions)
                -------- Resume Caravan Behavior --------
                Trigger - Run Caravan Orders Resume <gen> (checking conditions)
                -------- Acknowledge ownership change to player --------
                Trigger - Run Player Loses Wagon First Time <gen> (checking conditions)
                Trigger - Run Player Loses Wagon Subsequent Times <gen> (checking conditions)
            Else - Actions
        Custom script:   call RemoveLocation( udg_TempPointA )
        Custom script:   call RemoveLocation( udg_TempPointB )
        Custom script:   call RemoveLocation( udg_TempPointC )
        Custom script:   call RemoveLocation( udg_TempPointD )

Code:
Player Loses Wagon First Time
    Events
    Conditions
        ((This trigger) is on) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Trigger - Add Player Loses Wagon First Time Q <gen> to the trigger queue (Checking conditions)
        Wait 0.01 seconds
        Trigger - Turn on Player Loses Wagon Subsequent Times <gen>


Code:
Player Loses Wagon First Time Q
    Events
    Conditions
        GameOver Equal to False
    Actions
        Trigger - Turn off (This trigger)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Kael is alive) Equal to True
            Then - Actions
                Sound - Setup all volume channels for speech
                Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael19 <gen> and display Damn. We've lost th....  Modify duration: Add 0.00 seconds and Don't wait
                Wait for A05Kael19 <gen> to be 0.00 seconds from finished playing
                Sound - Reset all volume channels to 100%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Vashj is alive) Equal to True
            Then - Actions
                Sound - Setup all volume channels for speech
                Cinematic - Send transmission to (All players) from Vashj named Lady Vashj: Play A05LadyVashj20 <gen> and display There is still time....  Modify duration: Add 0.00 seconds and Don't wait
                Wait for A05LadyVashj20 <gen> to be 0.00 seconds from finished playing
                Sound - Reset all volume channels to 100%
            Else - Actions
        Trigger - Run Quest Secure Wagon Update Lost Wagon <gen> (checking conditions)
        Wait Campaign quest delay seconds
        Trigger - Remove (This trigger) from the trigger queue

Code:
Player Loses Wagon Subsequent Times
    Events
    Conditions
        ((This trigger) is on) Equal to True
    Actions
        Trigger - Add Player Loses Wagon Subsequent Times Q <gen> to the trigger queue (Checking conditions)

Code:
Player Loses Wagon Subsequent Times Q
    Events
    Conditions
        GameOver Equal to False
        (Kael is alive) Equal to True
    Actions
        Set RandomValue = (Random real number between 0.00 and 3.00)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RandomValue Less than or equal to 1.00
            Then - Actions
                Sound - Setup all volume channels for speech
                Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael21 <gen> and display They've retaken the....  Modify duration: Add 0.00 seconds and Don't wait
                Wait for A05Kael21 <gen> to be 0.00 seconds from finished playing
                Sound - Reset all volume channels to 100%
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        RandomValue Less than or equal to 2.00
                    Then - Actions
                        Sound - Setup all volume channels for speech
                        Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael22 <gen> and display The cage is lost! W....  Modify duration: Add 0.00 seconds and Don't wait
                        Wait for A05Kael22 <gen> to be 0.00 seconds from finished playing
                        Sound - Reset all volume channels to 100%
                    Else - Actions
                        Sound - Setup all volume channels for speech
                        Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael23 <gen> and display They're getting awa....  Modify duration: Add 0.00 seconds and Don't wait
                        Wait for A05Kael23 <gen> to be 0.00 seconds from finished playing
                        Sound - Reset all volume channels to 100%
        Trigger - Run Quest Secure Wagon Update Lost Wagon <gen> (checking conditions)
        Wait Campaign quest delay seconds
        Trigger - Remove (This trigger) from the trigger queue

err...what.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top