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

[Trigger] Trigger multiple firing into single

Status
Not open for further replies.
Level 3
Joined
May 7, 2016
Messages
38
So i have a trigger that is instantly fired multiple times (by Events like Unit is selected and deselected) and i want it to be fired only once
so i tried doing
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Activated Equal to False
    • Then - Actions
      • Set Activated = True
      • Do something
      • Set Activated = False
    • Else - Actions
and this
  • Trigger num1
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Activated Less than 1.00
      • Then - Actions
        • Set Activated = 1.00
      • Else - Actions
  • Trigger num2
  • Events
    • Game - Activated becomes Equal to 1.00
  • Actions
    • Do something
    • Set Activated = 0.00
but since the all enter at the same time it is useless
Is there a way to do this?
 
Level 7
Joined
Oct 19, 2015
Messages
286
You need to reset the Activated value after a 0.0 second timer. That way, all the queued triggers are allowed to run before the value is reset and thus, all the queued triggers will be ignored.
 
Status
Not open for further replies.
Top