• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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: 251
Last edited:
Level 12
Joined
Feb 22, 2010
Messages
1,115
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.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Yeah sure, doesn't even need quote.

Maybe this can be accepted a mini tutorial.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
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.
Top