• 🏆 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!

Info about trigger "queue"

Status
Not open for further replies.
Level 30
Joined
Jan 31, 2010
Messages
3,551
With all the possible healing modifiers in my map, such as skills that increase healing power, buffs that heal more lower your HP is, and items that reduce the amount of healing you do and transfer it to mana instead, I've come along a VERY difficult task of having to do a new set of lines for every healing skill in the game whenever I add a new "modifier".

But an idea hit me, that I could fire off one trigger to detect final healing power, but I have a question. Basically, what I'm curious to know, is that if I do a "Run Trigger" in the middle of another trigger, and that ran trigger has no timers or anything (so it's "instant"), will that actually work if I immediately after that action of running the trigger do something that involves values from run'd trigger? I hope it's not confusing as it sounds to me, I really can't explain it better.
 
Level 7
Joined
Oct 19, 2015
Messages
286
Yes, you can do that. When a trigger executes a "Run Trigger" action (or any other action that causes another trigger's event to fire), it will wait for the run trigger to finish (or hit a wait).
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
JASS:
globals
    real Heal = 0.00
endglobals

function OtherTriggerAction takes nothing returns nothing
    set Heal = 100.00
endfunction

function OnEvent takes nothing returns nothing
        
    set Heal = 5.00
    call TriggerExecute(MyOtherTrigger)// Trigger execute equals Run trigger <gen> ignoring conditions.
    
    call BJDebugMsg(R2S(Heal))// Will print out 100.00
endfunction

function Init takes nothing returns nothing
    set MyOtherTrigger = CreateTrigger()
    call TriggerAddAction(MyOtherTrigger, function OtherTriggerAction)
    //
endfunction
 
Status
Not open for further replies.
Top