Autocast casting problem

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.

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.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
It's a global unit since there's not a local in that function.

It said something about a first tutorial;
I don't know if it relates but..

You could also just ask emjlr3 himself ;) .
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top