SOLVED: Cleanup
I'm currently in the progress of removing memory leaks from a map. I would like to know if this trigger is free of memory leaks?
Unfortunately, I hadn't created the triggers, so I'm in the midst of cleaning many triggers similar to this. Suggestions?
I'm currently in the progress of removing memory leaks from a map. I would like to know if this trigger is free of memory leaks?
-
Spawns Human
-
Events
-
Time - Every 55.00 seconds of game time
-
-
Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Actions
-
Set DefendersSpawnPoint = (Center of Spawn First <gen>)
-
Set DefendersGroup = (Units owned by Player 12 (Brown))
-
Set DefendersAttackPoint = (Center of Attack First Elfs <gen>)
-
Unit Group - Pick every unit in DefendersGroup and do (Unit - Order (Picked unit) to Attack-Move To DefendersAttackPoint)
-
Custom script: call DestroyGroup(udg_DefendersGroup)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(BrollBearmantle is dead) Equal to True
-
-
Then - Actions
-
Hero - Instantly revive BrollBearmantle at DefendersSpawnPoint, Hide revival graphics
-
Unit - Order BrollBearmantle to Attack-Move To DefendersAttackPoint
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(ValeeraSanguinar is dead) Equal to True
-
-
Then - Actions
-
Hero - Instantly revive ValeeraSanguinar at DefendersSpawnPoint, Hide revival graphics
-
Unit - Order ValeeraSanguinar to Attack-Move To DefendersAttackPoint
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
(OnlyOnePaladin is dead) Equal to True
-
-
Then - Actions
-
Unit - Create 1 Paladin for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
Set OnlyOnePaladin = (Last created unit)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Then - Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit - Create 3 Footman for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Then - Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit - Create 3 Rifleman for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Then - Actions
-
Unit - Create 1 Dalaran Wizard for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Then - Actions
-
Unit - Create 1 Dragonhawk Rider for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Then - Actions
-
Unit - Create 1 Gryphon Rider for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Then - Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit - Create 2 Knight for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Then - Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit - Create 2 Cleric for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Then - Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit - Create 2 Sorceress for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 12 (Brown) Food used) Less than or equal to 70
-
-
Then - Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit - Create 2 Spell Breaker for Player 12 (Brown) at DefendersSpawnPoint facing Default building facing degrees
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_DefendersSpawnPoint)
-
Set DefendersGroup = (Units owned by Player 12 (Brown))
-
Unit Group - Pick every unit in DefendersGroup and do (Unit - Order (Picked unit) to Attack-Move To DefendersAttackPoint)
-
Custom script: call DestroyGroup(udg_DefendersGroup)
-
Unit - Order BrollBearmantle to Attack-Move To DefendersAttackPoint
-
Unit - Order ValeeraSanguinar to Attack-Move To DefendersAttackPoint
-
Custom script: call RemoveLocation(udg_DefendersAttackPoint)
-
-
Unfortunately, I hadn't created the triggers, so I'm in the midst of cleaning many triggers similar to this. Suggestions?
Last edited: