Enough to null local, or should it be removed?

Danis[h]

New Member
Reaction score
19
I was wondering it would be enough to null this location (for the trigger not to leak), or do I have to remove it as well?

Trigger:
  • Spawn1
    • Events
      • Unit - A unit enters Spawn 1 <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Entering unit)) Equal to Player 12 (Brown)
          • (Owner of (Entering unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Custom script: local location GoHere
      • Unit - Set mana of (Entering unit) to 1.00
      • Custom script: set GoHere = GetRectCenter(udg_region[R2I(GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()))])
      • Custom script: call IssuePointOrderLocBJ( GetTriggerUnit(), "move", GoHere )
      • Custom script: set GoHere = null
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
You need to remove it.

(...before you null it, of course.)
 

Danis[h]

New Member
Reaction score
19
You need to remove it.

(...before you null it, of course.)

Thanks.. I couldn't remember whether you had to do this or not :)


added "call RemoveLocation(GoHere)" before null.. so it should be good now, right?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Yes. Also, you might consider using [ljass]GetUnitState[/ljass] instead of [ljass]GetUnitStateSwap[/ljass], which calls the first function but reverses the arguments, and [ljass]IssuePointOrderLoc[/ljass] instead of [ljass] IssuePointOrderLocBJ[/ljass], which has no purpose at all and just calls the first function anyway.
 
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