• 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.

Info about trigger "queue"

Status
Not open for further replies.
Level 30
Joined
Jan 31, 2010
Messages
3,552
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