H_A_PK,
Code
function DamActions takes nothing returns nothing
// И тут твои действия.
endfunction
function IsDamaged takes nothing returns nothing
local trigger tr = CreateTrigger()
call TriggerRegisterUnitEvent(tr,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction(tr,function DamActions)
set tr = null
endfunction
function InitTrig_Eventdamage takes nothing returns nothing
local trigger tr = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(tr,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(tr,function IsDamaged)
set tr = null
endfunction
Это системка отлова, повреждён ли юнит.