• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

"Unit is going to deal damage" Event?

Status
Not open for further replies.

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
Hi!

Is there any possibility to detect an event before the calculating of damage dealt from unit x to unit y?
E.g. to make an enhanced evasion ability or something like this.

The "unit attacks unit" event is able to detect it, but it's a bit ugly cause it reacts to every right click. So if someone is insane and clicks an enemy (and his mouse) to death it will trigger many times instead of 1 attack^^
 
Level 7
Joined
May 18, 2010
Messages
264
Level 26
Joined
Mar 19, 2008
Messages
3,140
You can do the same trick as Viper is DotA has.
He recieves bonus damage in amount of hp lost by attacked enemy. The more loss, the more damage he gets.

Its triggered by normal Event Unit is attacked, with adding 'bonus damage ability' for short period of time. It's about 0.3 or so, because if you want the attack to deal bonus damage, 0.3 is enought, clicking Stop wo'nt help here, since Viper's attack animation takes about 0.25 sec.

Time dummy ability with short duration, and refer to that one while checking is actions should be fired or not.
For timing abilities I recommend my system (see signature).
 

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
I have in my map all types of bonus damage abilities made. It's quite simple^^

But I want to detect the action before the damage is dealt for avoiding the death of a unit although it would be evade / parry / and so on...

I really won't to give an additional text to the tooltip that tells you that deadly strikes can't proc this ability :p
 
Status
Not open for further replies.
Top