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

Getting the Buff end in trigger.

Status
Not open for further replies.
Level 3
Joined
Apr 28, 2007
Messages
20
Well, I have an ability called "Wield Sword" and it's based off of the Shaman's Bloodlust. And whenever it's used [target self only], your strength doubles, and your agility is cut by half.

So I have:

  • Sword Wield
  • Events
  • Unit - A unit Begins casting an ability
  • Conditions
  • (Ability Being Cast) Equal to Wield Sword
  • Actions
  • Hero - Modify Strength of (Casting Unit): Add (Strength of (Casting Unit) (Exclude Bonuses)) x 2)
  • Hero - Modify Agility of (Casting Unit): Subtract (Agility of (Casting Unit) (Exclude Bonuses)) / 2)
Now this bit seems to work, but how would I go about reseting the stats when the buff ends? I'm pretty sure I could figure out how to reset the stats, but what's the event for when the abilities duration thing ends?
 
Last edited:
Level 3
Joined
Apr 28, 2007
Messages
20
You just have to loop it until the unit no longer has the buffs

Oh, but if I loop it won't his strength keep increasing, and his agility decreasing? If not, you're doing something different for looping, and uhh; care to share? [=
Thanks.

Edit: Nevermind; this seems to work now..
  • Sword Wield
  • Events
  • Unit - A unit Begins casting an ability
  • Conditions
  • (Ability Being Cast) Equal to Wield Sword
  • Actions
  • Hero - Modify Strength of (Casting Unit): Add (Strength of (Casting Unit) (Exclude Bonuses)) x 2)
  • Hero - Modify Agility of (Casting Unit): Subtract (Agility of (Casting Unit) (Exclude Bonuses)) / 2)
  • Wait 60.00 Seconds
  • Hero - Modify Strength of (Casting Unit): Subtract (Strength of (Casting Unit) (Exclude Bonuses)) x 2)
  • Hero - Modify Agility of (Casting Unit): Add (Agility of (Casting Unit) (Exclude Bonuses)) / 2)
Ability Duration : 60
Ability Cooldown : 65
 
Last edited:
Level 3
Joined
Apr 28, 2007
Messages
20
I think this also doesn't work if the Hero already levels up. I think you can set the Hero's Str and Agi to integer vars first so that it also can be x or / in the same value before leveling up..

Yeah I noticed when the hero leveled with the skill enabled, his strength went way high, and his agility went down to like 5. I tried setting them to integer variables and now it doesn't go as crazy, thanks =P.
 
Status
Not open for further replies.
Top