ERhmm, you will have to recode the damage detection from scratch, allow me to simplify. . ..
Damage taken event registered when the unit is created.
Actual damage taken trigger.
Post action trigger directly after the event.
The first one is simple, when u create a unit/hero then via trigger u add the event to the actual trigger.
The damage detection activates and using the event Specific unit Takes Damage, this function Calls before damage is taken (BEFORE, BEFORE) alright now why is the a post trigger you ask? Here's the trick, when the detection trigger, make the unit invulnerable, won't take any damage and or crowd controls etc, immediately add a timer with 0 count down, Or something with trigger queue (someone enlighten this I forgot that trick), the point is that the post action must be seeming less and undetected by the player so that they wont see the "Invulnerable" so that you don't expose the trick.
In the post action simple make them back to vulnerable.
One thing to note that the conditions of the health of the damage taken unit can be set at the actual trigger, things happen before damage is being taken. The Killing blow can be then checked from there, the unit will never die since it's invulnerable
