- Joined
- Sep 2, 2004
- Messages
- 15
Code:
function Trig_Carrion_Swarm_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00I'
endfunction
function Trig_Carrion_Swarm_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetSpellTargetLoc()
local unit d = CreateDummy( GetOwningPlayer(u), u, 'A00M', GetUnitAbilityLevel(u, 'A00I'), 5)
call IssuePointOrderLocBJ( d, "carrionswarm", l )
call PolledWait(0.5)
call SetUnitPositionLoc( u, l )
call RemoveLocation(l)
set l = null
set u = null
set d = null
endfunction
//===========================================================================
function InitTrig_Carrion_Swarm takes nothing returns nothing
set gg_trg_Carrion_Swarm = CreateTrigger( )
call TriggerRegisterAnyUnitEventNL( gg_trg_Carrion_Swarm, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Carrion_Swarm, Condition( function Trig_Carrion_Swarm_Conditions ) )
call TriggerAddAction( gg_trg_Carrion_Swarm, function Trig_Carrion_Swarm_Actions )
endfunction
The dummy unit won't cast Carrion Swarm.
I've gone into the dummy unit and I've made him completely visible. I can physically lcick on him and see tha the has the Carrion Swarm spell, and can cast it, so the issue isn't that.
I know I use a BJ here, I've tried not using a BJ as well.