- Joined
- Feb 22, 2006
- Messages
- 960
So i use this damage detection system in my map, and the following trigger doesn't want to work, but why?
I only started with this trig some seconds ago and tested it and i saw it didn't worked at all :>
JASS:
scope wrath initializer wrathint
globals
integer wrathcount = 0
endglobals
private function wrathCond takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerDamageSource(),'A000') > 0 and GetUnitState(GetTriggerDamageTarget(),UNIT_STATE_LIFE) <= 0
endfunction
private function wrathActions takes nothing returns nothing
local unit u = GetTriggerDamageSource()
local unit t = GetTriggerDamageTarget()
call BJDebugMsg("test")
endfunction
private function wrathint takes nothing returns nothing
local trigger wi = CreateTrigger()
call TriggerAddCondition(wi,Condition(function wrathCond))
call TriggerAddAction(wi,function wrathActions)
call TriggerRegisterDamageEvent(wi)
set wi = null
endfunction
endscope
I only started with this trig some seconds ago and tested it and i saw it didn't worked at all :>