• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Trigger Evaluation-Order

Status
Not open for further replies.
I don't know if this was already mentioned before, but I wanna share the random experience I did.

It is about the order of trigger-evaluation of different leafs, if they have the exactly same event.

I created 2 leafs with a chat event. One of them will display "1", the other one "2", if fired:

135078d1399803559-gui-trigger-evaluation-order-test.png



Now... but what will be displayed first?

The visual order in which you see leafs in your list (pic above) does nothing say about the in-game evaluation order.

The only thing that really matters is the creation order. The leaf that was created first, also will be fired first in game.

So if you open a random map, you can't know what leaf was created first, and which was just moved around in list. Finaly you can't really say which one will fire first without testing.

This might be helpful for getting the correct order, thanks for Ceday's post:
You can determine which trigger created first by reading war3map.j file.

That's it. Anyway we all know that multiple triggers with same event should be avoided, but it's still good to know I think.

___________________________________
 

Attachments

  • Test.png
    Test.png
    1.3 KB · Views: 294
Last edited:
Yeah, one of the things that makes you happy when you realize.

Also if you open a random map, you can determine which trigger created first by reading war3map.j file.
 
Yeah sure, doesn't even need quote.

Maybe this can be accepted a mini tutorial.
 
It's entirely GUI dependant, in fact order of triggers won't change until you close the map, re-open it and save it.
This can be used to make a noob map protection (the map can be open, but can't be saved else it will crash when you will try to play the map, but yeah it's easy to avoid once you know what to do)

EDIT : Well, not sure it's clear, so let's go further.

I mean once you have open the map, even if you change the GUI trigger relative order, that won't change the map script.
Now, close the map, re-open it and save, the trigger order in the map script will be the same as the GUI relative order one.
In fact when you open a map, the GUI editor keeps the trigger relative order as a reference and that won't change until you close and re-open it.
 
Last edited:
Status
Not open for further replies.
Back
Top