- Joined
- Jul 29, 2010
- Messages
- 319
Hi, just wondering if anyone would be willing to help me go through each of my triggers 1 by 1 to help me find and fix any leaks that may be present? As far as my knowledge goes of memory leaks there are a quite a few of these triggers that don't leak since they don't use any of the known "leaky" actions, however there are a decent number of triggers that DO use actions that I think leak and would seriously appreciate the help in fixing them since I'm incredibly close to being able to release a beta/test map.
If anyone is willing to pick up the challenge then I'm grateful, triggers will be posted below.
To clarify, my map is a TD.
Trigger 1 - Setting Variables
Trigger 2 - Camera control
Trigger 3 - Removing escaped units
Trigger 4 - Dialog Response
Trigger 5 Selling units
Trigger 6 - Relaying units
Trigger 7 - Creating Enemy units
Trigger 8 - A unit dies
There are a few other triggers as well but they don't use commands that create units nor order them to move or anything of the sort, they're mostly just changing variables depending on ingame events so i left them out.
If anyone is willing to pick up the challenge then I'm grateful, triggers will be posted below.
To clarify, my map is a TD.
Trigger 1 - Setting Variables
-
Variables
-
Events
-
Time - Elapsed game time is 0.01 seconds
-
-
Conditions
-
Actions
-
Game - Display to (All players) the text: |c006969FFCreating ...
-
Player Group - Pick every player in (All enemies of Player 21 (Coal)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked player) slot status) Equal to Is playing
-
-
Then - Actions
-
Player Group - Add (Picked player) to Players
-
-
Else - Actions
-
-
-
-
Set NumberOfPlayers = (Number of players in Players)
-
Set CurrentWaveNum = 0
-
Set InitialPrepRound = 60.00
-
Set GoldPerKill = 2
-
Set UnitParameters1 = 1
-
Set UnitParameters2 = 4
-
Set ParameterIncrement = 2
-
Set GoldPerWave = 60
-
Set NumberOfLives = (30 x (Number of players in Players))
-
Hashtable - Create a hashtable
-
Set RegionsHashtable = (Last created hashtable)
-
-------- Lane 1 --------
-
Hashtable - Save Handle OfLane1Spawn1 <gen> as 1 of 1 in RegionsHashtable
-
Hashtable - Save Handle OfLane1Spawn2 <gen> as 2 of 1 in RegionsHashtable
-
-------- Lane 2 --------
-
Hashtable - Save Handle OfLane2Spawn1 <gen> as 1 of 2 in RegionsHashtable
-
Hashtable - Save Handle OfLane2Spawn2 <gen> as 2 of 2 in RegionsHashtable
-
-------- Lane 3 --------
-
Hashtable - Save Handle OfLane3Spawn1 <gen> as 1 of 3 in RegionsHashtable
-
Hashtable - Save Handle OfLane3Spawn2 <gen> as 2 of 3 in RegionsHashtable
-
-------- Lane 4 --------
-
Hashtable - Save Handle OfLane4Spawn1 <gen> as 1 of 4 in RegionsHashtable
-
Hashtable - Save Handle OfLane4Spawn2 <gen> as 2 of 4 in RegionsHashtable
-
-------- Lane 5 --------
-
Hashtable - Save Handle OfLane5Spawn1 <gen> as 1 of 5 in RegionsHashtable
-
Hashtable - Save Handle OfLane5Spawn2 <gen> as 2 of 5 in RegionsHashtable
-
-------- Lane 6 --------
-
Hashtable - Save Handle OfLane6Spawn1 <gen> as 1 of 6 in RegionsHashtable
-
Hashtable - Save Handle OfLane6Spawn2 <gen> as 2 of 6 in RegionsHashtable
-
-------- Lane 7 --------
-
Hashtable - Save Handle OfLane7Spawn1 <gen> as 1 of 7 in RegionsHashtable
-
Hashtable - Save Handle OfLane7Spawn2 <gen> as 2 of 7 in RegionsHashtable
-
-------- Lane 8 --------
-
Hashtable - Save Handle OfLane8Spawn1 <gen> as 1 of 8 in RegionsHashtable
-
Hashtable - Save Handle OfLane8Spawn2 <gen> as 2 of 8 in RegionsHashtable
-
Set DialogTitleString = Ready Up!
-
Set ShowIngameTriggerData = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShowIngameTriggerData Equal to True
-
-
Then - Actions
-
Game - Display to (All players) the text: (String(NumberOfPlayers))
-
Game - Display to (All players) the text: |c006969FFFinished ...
-
-
Else - Actions
-
-
Trigger - Run Event <gen> (checking conditions)
-
Trigger - Run Infomation <gen> (checking conditions)
-
Trigger - Run UnitTypes <gen> (checking conditions)
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Playable map area)
-
-
-
-
-
Zoom Out
-
Events
-
Player - Player 1 (Red) types a chat message containing -cam as A substring
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Substring((Entered chat string), 1, 4)) Equal to -cam
-
-
Then - Actions
-
Set SubStringInteger = ((Integer((Substring((Entered chat string), 5, 6)))) x 1000)
-
Camera - Set (Triggering player)'s camera Distance to target to (Real(SubStringInteger)) over 0.50 seconds
-
-
Else - Actions
-
-
-
-
UnitEntersFinalRegion
-
Events
-
Unit - A unit enters Final <gen>
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Triggering unit)) Equal to Player 21 (Coal)
-
-
Then - Actions
-
Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
-
Unit Group - Remove (Triggering unit) from CurrentLivingUnits
-
Unit - Remove (Triggering unit) from the game
-
Set NumberOfLives = (NumberOfLives - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
NumberOfLives Greater than 0
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(All units of CurrentLivingUnits are dead) Equal to True
-
-
Then - Actions
-
Sound - Play ArrangedTeamInvitation <gen>
-
Unit Group - Remove all units of CurrentLivingUnits from CurrentLivingUnits
-
Countdown Timer - Start RoundPreperationTimer as a One-shot timer that will expire in 30.00 seconds
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Player - Set (Picked player) Current gold to (((Picked player) Current gold) + 300)
-
-
-
-
Else - Actions
-
-
-
Else - Actions
-
Player Group - Pick every player in Players and do (Actions)
-
Loop - Actions
-
Game - Defeat (Picked player) with the message: Defeat!
-
-
-
-
-
-
Else - Actions
-
-
-
-
Response
-
Events
-
Dialog - A dialog button is clicked for ReadyUp
-
-
Conditions
-
Actions
-
Dialog - Hide ReadyUp for (Triggering player)
-
Unit - Create 1 Builder for (Triggering player) at ((Triggering player) start location) facing 0.00 degrees
-
Unit Group - Add (Last created unit) to Builders
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Lane1Spawn <gen> contains (Last created unit)) Equal to True
-
-
Then - Actions
-
Set LaneBoolean[1] = True
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Lane2Spawn <gen> contains (Last created unit)) Equal to True
-
-
Then - Actions
-
Set LaneBoolean[2] = True
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Lane3Spawn <gen> contains (Last created unit)) Equal to True
-
-
Then - Actions
-
Set LaneBoolean[3] = True
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Lane4Spawn <gen> contains (Last created unit)) Equal to True
-
-
Then - Actions
-
Set LaneBoolean[4] = True
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Lane5Spawn <gen> contains (Last created unit)) Equal to True
-
-
Then - Actions
-
Set LaneBoolean[5] = True
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Lane6Spawn <gen> contains (Last created unit)) Equal to True
-
-
Then - Actions
-
Set LaneBoolean[6] = True
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Lane7Spawn <gen> contains (Last created unit)) Equal to True
-
-
Then - Actions
-
Set LaneBoolean[7] = True
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Lane8Spawn <gen> contains (Last created unit)) Equal to True
-
-
Then - Actions
-
Set LaneBoolean[8] = True
-
-
Else - Actions
-
-
-
-
Selling Units
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Sell
-
-
Then - Actions
-
Special Effect - Create a special effect attached to the overhead of (Triggering unit) using UI\Feedback\GoldCredit\GoldCredit.mdl
-
Unit - Kill (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Ancient Protector
-
-
Then - Actions
-
Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 144)
-
Player - Set (Owner of (Triggering unit)) Current lumber to (((Owner of (Triggering unit)) Current lumber) + 8)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Skeletal Wizard
-
-
Then - Actions
-
Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 160)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Sorceress
-
-
Then - Actions
-
Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 100)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Rifleman
-
-
Then - Actions
-
Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 48)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Guard
-
-
Then - Actions
-
Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 25)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Royal Guard
-
-
Then - Actions
-
Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) + 80)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
Relay1
-
Events
-
Unit - A unit enters Lane1Relay <gen>
-
Unit - A unit enters Lane5Relay <gen>
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Triggering unit)) Equal to Player 21 (Coal)
-
-
Then - Actions
-
Unit - Order (Triggering unit) to Move To (Center of Relay1 <gen>)
-
-
Else - Actions
-
-
-
-
Lane1
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
LaneBoolean[1] Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SpecialWave Equal to False
-
-
Then - Actions
-
Unit - Create 1 UnitTypes[(Random integer number between UnitParameters1 and UnitParameters2)] for Player 21 (Coal) at (Center of (Load (Random integer number between 1 and 2) of 1 in RegionsHashtable)) facing 0.00 degrees
-
Unit Group - Add (Last created unit) to CurrentLivingUnits
-
Unit - Order (Last created unit) to Move To (Center of Lane1Relay <gen>)
-
Unit - Add Ghost (Visible) to (Last created unit)
-
-
Else - Actions
-
-------- SpecialWave --------
-
Unit - Create 1 UnitTypes[(Integer(Special))] for Player 21 (Coal) at (Center of (Load (Random integer number between 1 and 2) of 1 in RegionsHashtable)) facing 0.00 degrees
-
Unit Group - Add (Last created unit) to CurrentLivingUnits
-
Unit - Order (Last created unit) to Move To (Center of Lane1Relay <gen>)
-
Unit - Add Ghost (Visible) to (Last created unit)
-
-
-
-
Else - Actions
-
-
-
-
UnitDies
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) is in CurrentLivingUnits) Equal to True
-
-
Then - Actions
-
Player - Set (Owner of (Killing unit)) Current gold to (((Owner of (Killing unit)) Current gold) + GoldPerKill)
-
Floating Text - Create floating text that reads (|c00FFD700+ + ((String(GoldPerKill)) + |r)) above (Triggering unit) with Z offset -200.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 300.00 towards 65.00 degrees
-
Floating Text - Change the age of (Last created floating text) to 2.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(All units of CurrentLivingUnits are dead) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SpecialWave Equal to True
-
-
Then - Actions
-
Set SpecialWave = False
-
Set SpecialWaveChance = 0
-
-
Else - Actions
-
-
Sound - Play ArrangedTeamInvitation <gen>
-
Player Group - Pick every player in Players and do (Actions)
-
Loop - Actions
-
Player - Set (Picked player) Current gold to (((Picked player) Current gold) + GoldPerWave)
-
-
-
Unit Group - Remove all units of CurrentLivingUnits from CurrentLivingUnits
-
Countdown Timer - Start RoundPreperationTimer as a One-shot timer that will expire in 30.00 seconds
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-