Trigger Bug - Trigger executes twice

FarAwaY

TH.net Regular
Reaction score
9
Well I was making a few triggered spells for fun, and I noticed everytime I activate one of the spells, it would activate twice instead of once.

Now my real question is - what causes triggers to execute twice instead of once?
 

Summoned

New Member
Reaction score
51
Whenever you ask a question about a trigger you made, you really have to post the trigger for us to be able to do anything. :confused:
 

FarAwaY

TH.net Regular
Reaction score
9
Nono...its not the trigger that Im worried about.

What Im interested in are the things that will cause triggers to execute twice instead of the "normal" once.
 

perkeyone

something clever
Reaction score
71
one thing that could cause your trigger to execute twice instead of once is if the trigger's event happens twice, or if the trigger's events are in a loop that runs twice or theres a condition in the trigger that is true twice... you should just show us the trigger bud
 

FarAwaY

TH.net Regular
Reaction score
9
Haha. Actually I already figured out the bug, you see....just curious to know if there are more of such things that could possibly cause the trigger to execute twice.

For eg, my trigger bug is

A Unit Takes Damage Event

Actions
-Create dummy unit
blah blah
blah blah
Pick every unit in units within 300 range of ********all the filters etc
and do actions - Deal 50,000 damage to picked unit.

Now, since the trigger runs everytime damage is taken, of course it would execute twice....maybe more than twice. Thrice....Four times....As many as the number of units is picked.

To fix it = simply dont use any waits and just add in "Turn off this trigger" at the top, and "Turn on this trigger" at the bottom.

Its not a problem to fix it....just curious if there are more of such things.

EDIT: Ah sorry. Your edited post is the same as what I said ^^. Event happens twice. For the loop runs twice, I already knew that but the condition I didnt know. Thanks for the info.
 
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