• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗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

Bannar

Code Reviewer
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