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

Why does this fire twice ?

Status
Not open for further replies.
Level 11
Joined
Jan 2, 2016
Messages
472
  • Events
    • Unit - MyUnit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Gather
  • Actions
    • Set temp_herb = (Target unit of ability being cast)
    • Animation - Play temp_herb's Stand Work animation
  • Events
    • Unit - MyUnit finishes casting an ability
  • Conditions
    • (Ability being cast) equal to Gather
  • Actions
    • Unit - Kill temp_herb
    • Game - Display to (All Players) the text: (Name of temp_herb) // this fires twice or probably the whole trigger
 
Level 11
Joined
Jan 2, 2016
Messages
472
I found the problem.It seems that having an ability in a spellbook will trigger it too.

EDIT: This is how i "fixed" it.

  • Events
    • Unit - MyUnit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Gather
  • Actions
    • Set temp_herb = (Target unit of ability being cast)
    • Animation - Play temp_herb's Stand Work animation
  • Events
    • Unit - MyUnit finishes casting an ability
  • Conditions
    • (Ability being cast) equal to Gather
  • Actions
    • If (All conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (temp_herb) is dead equal to False
      • Then - Actions
        • Unit - Kill temp_herb
      • Else - Actions
        • Game - Display to (All Players) the text: (Name of temp_herb)
 
Last edited:
Status
Not open for further replies.
Top