Frizz.Meister
New Member
- Reaction score
- 0
I have a simple orb ability based off poison arrows. It deals damage equal to the users agility, and worked fine. However it wouldnt fire when auto-cast. I used the auto-cast tutorial and it all makes sense. Except 1 area.
I understand the function entirely except for the second line." call TriggerRegisterUnitEvent(gg_trg_Auto_Attack,u, EVENT_UNIT_SPELL_EFFECT) "
What unit is u? As no local is declared and surely a global would prevent the trigger being MUI.
function InitTrig_Auto_Attack takes nothing returns nothing
set gg_trg_Auto_Attack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Auto_Attack, EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(gg_trg_Auto_Attack,u, EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Auto_Attack, Condition(function Auto_Attack_Detect))
call TriggerAddAction(gg_trg_Auto_Attack, function Auto_Attack_Detect_Actions)
endfunction
I understand the function entirely except for the second line." call TriggerRegisterUnitEvent(gg_trg_Auto_Attack,u, EVENT_UNIT_SPELL_EFFECT) "
What unit is u? As no local is declared and surely a global would prevent the trigger being MUI.