• 🏆 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!

Detect hit

Status
Not open for further replies.
Level 6
Joined
Jul 22, 2009
Messages
214
Is it possible to detect when a unit is hit? Is it possible to do this without a damage detection engine cause all damage are deal with trigger in my system? I've set all attack type(except one) to deal 0.00 % damage to any armor type. I calculate all the damage variation with my system and I deal the damage with the attack type that I've set to deal 100% damage to all armor type. I've try to use A unit is Attacked but it don't work for range unit, the best thing would be to detect when the projectile hit the target for deal the damage a this time.

Thank for those who will help me
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
0 Damage is a damage amount detected by the system. System detects 0 damage. Any Damage Detection System (Bribe's or Weep's) Should work for you :)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
That's the hardest part. It requires a lot of script. Nestharus and Bribe were working on something like that but is still hard.

You can add buffs to all your spells. If the unit has the buff, you know it was a spell. Remove the buff and do the spell damage. The time gap between the damage detection, the buff add and buff removal is too fast to take advantage of that.
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Lal? Intuitive systems exist for about 3-4 years :p
However, it forces you to remove all damage from spells units in your map can use and trigger that damage instead (by using function inside given system).

I'm pretty sure GUI user here, so Damage Engine all the way. If you follow that way, attack type table in gameplay constants can be reseted, no need to keep 0.00% values.
 
Status
Not open for further replies.
Top