• 🏆 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!

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