Quick check: Would this leak?

MintJulep

New Member
Reaction score
4
Code:
OrbShotMovement
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set testpoint = (([B]Position of testunit[/B]) offset by 256.00 towards 0.00 degrees)
        Custom script:   call RemoveLocation (udg_testpoint)

Basically, I want to know if referring to "Position of testunit" by itself, instead of a variable, would cause a simple trigger like this to leak.

Should it instead look like:
Code:
OrbShotMovement
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        [B]Set testunitpos = ((Position of testunit)[/B]
        Set testpoint = (([B]testunitpos[/B]) offset by 256.00 towards 0.00 degrees)
        Custom script:   call RemoveLocation (udg_testpoint)
        Custom script:   call RemoveLocation (udg_testunitpos)

Or should I not worry about the first box of code?
 

Exide

I am amazingly focused right now!
Reaction score
448
The first leaks.
The second is correct.
 

DK's Pride

New Member
Reaction score
7
The 2nd solution

The second solution is correct cause you set 2 points :p, therefor you got to make 2 variables for a Point with polar offset
 
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