Quick question on null'ing effects.

Inflicted

Currently inactive
Reaction score
63
For some reason I always return to this topic :/

Anyways, I know how to and would just like a brief clarification if this is necessary or not:

Trigger:
  • Actions
    • Custom script: local effect e
    • Special Effect - Create a special effect...
    • Custom script: set e = GetLastCreatedEffectBJ()
    • Do stuff with effect blah blah...
    • Custom script: call DestroyEffectBJ(e)
    • Custom script: set e = null


I'm mainly looking at these lines:

Custom script: call DestroyEffectBJ(e)
Custom script: set e = null

Cool. Well I recall that Removing effects using the blue line will prevents leaks, but also clearing the local is concerning. Therefore I added the line in red.

Is that necessary or cause any problems?
 

Laiev

Hey Listen!!
Reaction score
188
Is necessary to prevent [ljass]local effect e[/ljass] to leak.

Also, DestroyEffectBJ -> DestroyEffect
 
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