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

[JASS] DamageType Detection

Status
Not open for further replies.
Level 14
Joined
Dec 12, 2012
Messages
1,007
Hello all,

I made a damage detection system that detects the damage dealt by a specific unit and the damagetype (like normal, piercing, siege, etc.)

The problem is, that the system can't differ if an attack was physical or by a spell, so a stormbolt has the damagetype HERO, just as the normal physical attack of the mk. Itemdamage (like orb of venom) is also declared as HERO, which is quite bad.

I found some quite old threads were it was said that it's impossible to detect that, so... is it really impossible? Or is there a way?

Greetings,
lfh
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
If you don't know how, then you shouldn't even try. It is very difficult.

You would have to handle the animations and damage points. Use timers to do that. You would have to manage the damage values, and there is no good way to factor in default buffs, you'd need code them also or create a buff management system.
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
Ah, ok now I get what you meant. Well, I won't do that as it would be a ridiculous amount of work. :D

But I wounder: Is it possible to copy-paste a unit? Then one could copy the damage-source and repeat the last order (Attack or Spell) on some dummy unit. According to the health-change of the dummy it should be possible to figure out the damage type, right?

Greetings,
lfh
 
Status
Not open for further replies.
Top