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

Help with buff removal.

Status
Not open for further replies.
Level 5
Joined
Aug 23, 2007
Messages
141
Here's the deal. I created a unit targetted spell that, when casted, casts a buff that modifies damage (based off Inner Fire) with a dummy unit, targetting the casting unit, then blinks to the target of the ability and attacks it once.

The hard part is removing the buff once the attack either hits or misses.

Anyone know how? The "Unit is Attacked" event won't cut it. The buff has to be removed after the Hero either hits or misses with the attack.
 
Level 5
Joined
Aug 23, 2007
Messages
141
Unit Is Attacked won't cut it because the attack registers for that event before the damage is dealt, around the time the attacker's hand is raised. If I remove the buff at that time, the damage isn't modified by the buff. And then it's tricky to use a wait action, because it isn't consistent with the unit's attack speed. Like if you attack twice in one half of a second. Or if you're slowed to the point where it takes two seconds to launch one attack.
 
Status
Not open for further replies.
Top