Destroying Triggers

INCINERATE

New Member
Reaction score
12
okay so i was reading emjlr3's guide about leaks , and i stubbled upon this line ..

"and lastly, one good Custom Script to use is that when you have a trigger that will only run once, then is useless. In those cases, put this at the end of the trigger. It can greatly reduce lag in your maps.

Code:

Custom script: call DestroyTrigger( GetTriggeringTrigger() ) "



can anyone tell me how true is this? does this really do anything to increase map performance? , and should i be doing it, cause i do have quite alot of triggers that run only once , but i dont destroy it as it says here..

any 2nd opinions?
 

Shura

New Member
Reaction score
45
Well I'm not an expert in Jass, so I can't say how effective it is. I'm sure that putting them at the end of those triggers would reduce lag if there is some, but it's not like your game will be lagging just because you don't put those actions. If you're still looking for a good second opinion, you'll need someone else.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, this depends on which triggers you destroy...
It doesn't matter if you destroy a trigger which only runs on Map Initialization, as it has already run once, and will never run again...

But, if you have a trigger which, for example, will run every second, the first 10 seconds, then it can be a good idea to destoy it ;)

So triggers which, if not destroyed, will run again, but won't do anything (Or you don't want them to do anything) destroy them ;)
 
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