• It's time to dig through Hive's model database and dust off some oldie but goldie models and enter Hive's Texturing Contest #31 : Repurposing! Click here to enter!
  • 🏆 Hive's 5th HD Modeling Contest: Creep Camp is now open! Click here to enter!

Help with buff removal.

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