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

[Trigger] Does this leak, and if so, how do I fix it?

Status
Not open for further replies.
Level 3
Joined
Mar 18, 2010
Messages
24
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Greater Heal
    • ((Target unit of ability being cast) is alive) Equal to True
  • Actions
    • Set Loc[2] = (Position of (Target unit of ability being cast))
    • Set Group = (Units within 800.00 of Loc[2] matching (((Matching unit) Not equal to (Target unit of ability being cast)) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Owner of (Target unit of ability being cast))))))
    • Unit Group - Pick every unit in Group and do (Actions)
      • Loop - Actions
        • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\HealingWave\HealingWaveTarget.mdl
        • Special Effect - Destroy (Last created special effect)
    • Custom script: call DestroyGroup (udg_Group)
    • Custom script: call RemoveLocation (udg_Loc[2])
I think this leaks: 'Create a special effect at (Position of (Picked unit))' but I don't know how to fix it for a unit group with an unset amount of units in it
 
Level 11
Joined
Jan 25, 2009
Messages
572
Yes this below leaks:
  • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\HealingWave\HealingWaveTarget.mdl
A position leak. Create a location variable inside the Unit Group Loop stored with Position of picked unit and then you destroy it IN the Unit Group Loop. Easy as a cake =)
 
Level 3
Joined
Mar 18, 2010
Messages
24
Yes this below leaks:
  • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\HealingWave\HealingWaveTarget.mdl
A position leak. Create a location variable inside the Unit Group Loop stored with Position of picked unit and then you destroy it IN the Unit Group Loop. Easy as a cake =)

Ofcourse, stupid of mine. thanks
can't give u +rep again, sorry.
 
Status
Not open for further replies.
Top