• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Difference between Run trigger or Add trigger to Queue?

Status
Not open for further replies.
Level 16
Joined
May 2, 2011
Messages
1,345
Hello,

I just want to double check if my thought is correct:

Assuming We have trigger T1 and T2. T2 is used inside T1

  • If T1 contains Run T2, then T1 actions will run down to this action, then all of T2 actions will run, and then T1 will continue running.
  • If T1 contains Add T2 to trigger queue, then all of T1 actions will run, and only after they are finished, T2 trigger will start.
Are the above statements true and completely accurate? if not, then what is the accurate behaviour?

Thanks
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
1. true
2. not really true. trigger queues is a different concept. You can add several triggers to the trigger queue, but only the first will run. As soon as you use "remove the first trigger from trigger queue", the next trigger will run.

So the next trigger can only run, if the currently active trigger is removed from the queue (the trigger will still finish running though).
 
Level 16
Joined
May 2, 2011
Messages
1,345
1. true
2. not really true. trigger queues is a different concept. You can add several triggers to the trigger queue, but only the first will run. As soon as you use "remove the first trigger from trigger queue", the next trigger will run.

So the next trigger can only run, if the currently active trigger is removed from the queue (the trigger will still finish running though).
@2

does that mean second trigger will only run if, at the end of the first trigger, there is action "remover current trigger from trigger queue" as the last action? and if I didnt use this action nothing will happen after first trigger is finished?
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
yes that's true. You can use "remove trigger from queue" before it ends though. The remaining actions will still be executed.
When you use "remove trigger from queue" the next trigger will be started, before the current trigger is continued. (similar to using run trigger)
 
Status
Not open for further replies.
Top