A quick question about point and how to remove them

Solu9

You can change this now in User CP.
Reaction score
216
SOLVED

I have a trigger like this

Trigger:
  • Frag Granade Damage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frag Granade
    • Actions
      • Unit - Create 1 Frag Granade Dummy for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)


To be completely honest Im not sure if this is leaking or not, I believe it is.

The question is: Can I use a custom script to remove the location when do the trigger like this?
 

Sil3nt

SUP?
Reaction score
134
Yes it is leaking. If you want to clear it you'll need to set every point into a variable first and then refer to that and destroy it at the end.

Trigger:
  • Melee Initialization
    • Events
    • Conditions
    • Actions
      • Set temp_loc = (Target point of ability being cast)
      • Unit - Create 1 Footman for Player 1 (Red) at temp_loc facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_temp_loc)


Hope that helps.
 

Solu9

You can change this now in User CP.
Reaction score
216
So to clarify this for myself, my trigger will look like this right?

Trigger:
  • Frag Granade Damage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frag Granade
    • Actions
      • Set Frag_Target = (Target point of ability being cast)
      • Unit - Create 1 Frag Granade Dummy for (Owner of (Casting unit)) at Frag_Target facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Custom script: call RemoveLocation (udg_Frag_Target)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)


Where the variable Frag_Target is a point.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top