Hello everybody.
This is a very simple question (I don't know if its easy though, which isn't the same thing as simple). I just wanted to know how I could detect when a hero performs a critical strike with the ability. I've tried using the event "EVENT_PLAYER_UNIT_SPELL_EFFECT," but it doesn't seem to recognize the spell Critical Strike, neither with "EVENT_PLAYER_UNIT_SPELL_CAST." I don't even set any conditions and it still doesn't recognize it.
Thanks in advance.
By the way, here is the code I used to test it
just in case I've done anything stupid.
This is a very simple question (I don't know if its easy though, which isn't the same thing as simple). I just wanted to know how I could detect when a hero performs a critical strike with the ability. I've tried using the event "EVENT_PLAYER_UNIT_SPELL_EFFECT," but it doesn't seem to recognize the spell Critical Strike, neither with "EVENT_PLAYER_UNIT_SPELL_CAST." I don't even set any conditions and it still doesn't recognize it.
Thanks in advance.
By the way, here is the code I used to test it
JASS:
scope Crit initializer Init
private function Actions takes nothing returns nothing
call BJDebugMsg("Critical!")
endfunction
private function Init takes nothing returns nothing
local trigger CritTrig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(CritTrig, EVENT_PLAYER_UNIT_SPELL_EFFECT) //or SPELL_CAST
call TriggerAddAction(CritTrig, function Actions)
set CritTrig = null
endfunction
endscope
just in case I've done anything stupid.
