• 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.

Leak clarification

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
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
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
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.
Top