• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Are Leaks Only Caused by Trigger Actions?

Status
Not open for further replies.
Level 8
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 8
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