• 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.

[Solved] Damage detection system, that doesn't overflow on kill?

Status
Not open for further replies.
Level 2
Joined
Mar 18, 2018
Messages
8
Does anyone know how I could accomplish the following: if unit happens to be killed, DDS detects damage that was needed/enough to kill the unit, but no more. I couldn't find a DDS that would detect the damage after it is done.

Like, if a damaging unit has 4000 dmg, and damaged unit has 3 hp left, it detects 3 instead of 4000.

Thanks, in advance.
 
Level 7
Joined
Jan 23, 2011
Messages
351
I don't think you could find one that does that. You could use a trigger positionated at the top of all your triggers with the only use of setting a variable like "TrueDamage", and you check an if like "If life of unit < dmg then set TrueDamage=life of unit"
 
Level 2
Joined
Mar 18, 2018
Messages
8
Thanks to you guys I eventually solved it using A unit is attacked event which reads the HP of attacked unit before the damage is done.
 
Level 2
Joined
Mar 18, 2018
Messages
8
Click Stop before animation finish and watch the glitch happens ^^
I did try that quite some time it is possible indeed, but it isn't a problem for my map, because you can't gain any advantage from it, you can only hurt yourself with the abuse.
 
Status
Not open for further replies.
Top