• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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,243
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