• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Are Leaks Only Caused by Trigger Actions?

Status
Not open for further replies.
Level 9
Joined
Jul 8, 2013
Messages
249
Suppose I have a trigger condition like this:
  • (Number of units in (Units within 300.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))) Greater than 0
Does the position of triggering unit in that condition leak?
 
Level 5
Joined
Jan 27, 2014
Messages
164
Workaround for this is to create a if then else block within the action and use variables so that you can clear off later.

Example:
Event
Condition
- <empty>
Action
- Set temp_point....
- Set unitgroup...
- If then else
-- If
--- (Number of units in unitgroup) Greater than 0
-- Then
--- <Your action>
-- Else
- Clear temp_point
- Clear unitgroup
 
Level 9
Joined
Jul 8, 2013
Messages
249
Workaround for this is to create a if then else block within the action and use variables so that you can clear off later.

Example:
Event
Condition
- <empty>
Action
- Set temp_point....
- Set unitgroup...
- If then else
-- If
--- (Number of units in unitgroup) Greater than 0
-- Then
--- <Your action>
-- Else
- Clear temp_point
- Clear unitgroup

Right, that's what I figured. Thanks.
 
Status
Not open for further replies.
Top