I don't get it.
It cant be the wait because it is plenty long enough and it cant be the unit because it gets the ability...
It cant be the wait because it is plenty long enough and it cant be the unit because it gets the ability...
Code:
function Trig_Hunger_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07L' ) ) then
return false
endif
return true
endfunction
function Trig_Hunger_Actions takes nothing returns nothing
local unit u
set u = GetSpellTargetUnit()
call UnitAddAbility( u, 'A032')
call IssueImmediateOrderById( u , 'A032' )
call PolledWait (1.50)
call UnitRemoveAbility( u, 'A032' )
endfunction
//===========================================================================
function InitTrig_Hunger takes nothing returns nothing
set gg_trg_Hunger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunger, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Hunger, Condition( function Trig_Hunger_Conditions ) )
call TriggerAddAction( gg_trg_Hunger, function Trig_Hunger_Actions )
endfunction