staind25
TH.net Regular
- Reaction score
- 7
So I started using Temp variables for memory leak removal...my question is, do I need multiple instances of these variables, or as long as there are no waits in the trigger, can I use the same one each time?
For example, if both of these triggers ran at the same time, would I have issues?
The biggest difference between the two triggers is that they use different spells. So, my question is, if both spells fire at the same time, will the variables clash, or will they run correctly (Notice I'm using the same TempPoint variable in both)?
Just trying to wrap my brain around successfully removing leaks Thanks!
For example, if both of these triggers ran at the same time, would I have issues?
Trigger:
- Actions
- Set TempPoint = (Position of (Target unit of ability being cast))
- Unit - Create 1 Dummy Druid Unit for (Owner of (Triggering unit)) at TempPoint facing TempPoint
- Custom script: call RemoveLocation( udg_TempPoint )
- Unit - Order (Last created unit) to Orc Raider - Ensnare (Target unit of ability being cast)
- Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
- Trigger - Turn on Roots Break <gen>
Trigger:
- Loop - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing (35.00 x (Real((Level of Frost Nova (Triggers) for (Triggering unit))))) damage of attack type Spells and damage type Cold
- Set TempPoint = (Position of (Picked unit))
- Unit - Create 1 Dummy Mage Unit (Frosty Ensnare) for (Owner of (Triggering unit)) at TempPoint facing TempPoint
- Custom script: call RemoveLocation( udg_TempPoint )
- Unit - Order (Last created unit) to Orc Raider - Ensnare (Picked unit)
- Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
The biggest difference between the two triggers is that they use different spells. So, my question is, if both spells fire at the same time, will the variables clash, or will they run correctly (Notice I'm using the same TempPoint variable in both)?
Just trying to wrap my brain around successfully removing leaks Thanks!