Leak clarification

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,347
A couple of quick leak questions:

1.) This leaks right becuase 2 points are refernced?
  • Set T_Point = ((Position of Triggering Unit) offset by 200.00 towards 0.00 degrees)
So the solution:
  • Set Point = Position of Triggering Unit
  • Set T_Point = (Point offset by 200.00 towards 0.00 degrees)
2.) Also, does an action like this leak since it references a point:
  • Set UG = Units within 500.00 of (Position of TriggeringUnit)matching (((Matching unit) is alive) Equal to True
So the Solution:
  • Set Point = Position of triggering unit
  • Set UG = Units within 500.00 of Point matching (((Matching unit) is alive) Equal to True
 
If you want to avoid Unit Group leak, just do this;
  • Custom script: set bj_wantDestroyGroup = true
  • ---DO YOUR UNIT GROUP ACTIONS HERE---
For your #2, yeah it leaks a location so what you do is correct.

For a simpler way (to reduce variable), you should just set the location and do what I said;
  • Set Point = Position of (Triggering unit)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every Units within 500.00 of Point matching ((Matching unit) is alive) Equal to true
    • Loop - Actions
      • ---HERE IS THE ACTIONS---
  • Custom script: call RemoveLocation(udg_Point)
 
Status
Not open for further replies.
Back
Top