Generic Variables, Waits and Leaks

ThePlague

New Member
Reaction score
14
The Generic Variables Triggering unit, casting unit, target unit of order, last created special effect, last created lightning

all I know is triggering unit carries over waits and doesnt leak

but for the rest; which ones carry over waits and which leak if not set to a specific variable

also if a local array is created is there anyway to null the array? or is it only necessary to null the values of the array that are set?

and just out of curiosity why do you have to "call DestroyLocation" for global points? shouldnt they be deleted when they are overwritten?
 

ThePlague

New Member
Reaction score
14
ok that answers everything except I still dont to know the details about the generic variables


btw does setting a point to null have any point at all? since ur destroying it anyways?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> does setting a point to null have any point at all?

If the variable was local, yes.
On globals it's pointless.

> since you're destroying it anyway?

Actually, you're not destroying the variable. Only the content.


"Last created ..." always has the very latest <whatever> that was created.
If you create a unit for example, then wait and during that wait another trigger runs that also creates a unit,
then "last created unit" will be that last one, not the original anymore.

"Casting unit", along with all other spell event responses is not very stable.
And more often than not doesn't make it past a wait.
Other event responses like Triggering unit or Dying unit are rock-stable.



For local arrays, you need to null the used indexes.


> shouldn't they be deleted when they are overwritten?

Well, no. The previous content is simply lost.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top