So first you want to grab a damage detection system from these forums. You need this because there is no "A unit takes damage" event. The system creates an event for every unit in the map, effectively giving you that event.
ALL triggers that you want to run when damage is dealt must be placed in the main damage detection trigger. In this trigger, triggering unit will be the unit that takes damage, and damage source will be the unit that deals damage. Basically, you need to create an if-then statement for each mini-trigger within the damage detection trigger. So, you would have "If triggering unit has buff frost arrows, then...".
Also to note, in the object editor, your "frost arrows" buff needs to have like 0.01 sec duration. And make it a custom buff, not actual frost arrows...otherwise it would interfere with real Frost Arrows (if you use them).
The then part will consist of setting the hp of the unit to (current hp + damage taken). The actual damage would not be dealt until after this trigger runs, so this effectively negates the original attack damage. Next, in the then part, you want to do your triggered damage to the unit.
And that's "roughly" how a damage detection system works, and how you can customize it to your needs.
Kaerf - So i use the Item health bug to damage them? but what if the units inventory is full.
Curo - what if their life is so low that a normal hit kill them before the then part can heal the unit back?
Ok thanks i understand now.
But for Curo is it possible to like check if hero is above 50% hp then wait 0.01 before healing so he will get damaged first and if it is below 50% just heal straight away?
Why can't you just wait 0.00 seconds?
Because WC3 has a hardcoded minimum wait time, so using a timer is the only way to get a 0.00 second wait, unfortunately.
Oh of course sorry, the 0.27 second wait I believe? I forgot about that.
You forgot to add the life didn't you? After you add the +1 million life bonus abillity, you still need to add the life.