• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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