Can you find out what's wrong with my trigger ? I'm using Vexorian's CS. All this trigger does when I cast the spell is show a message "cast". The other codes won't work. Please help. Thanks.
JASS:
function Trig_SpellSurge_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A00C039;
endfunction
function Trig_SpellSurge_Actions takes nothing returns nothing
local location loc = GetSpellTargetLoc()
local unit u = GetTriggerUnit()
local integer dopt
set dopt = DamageTypes(ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC) + DontDamageSelf()
call AddAreaDamagerForUnitLoc(u, "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl", "Abilities\\Spells\\NightElf\\FaerieDragonInvis\\FaerieDragon_Invis.mdl", "overhead", loc, 200. , 0.02, 0.02, 325., false, dopt)
call PolledWait(0.5)
call RemoveLocation(loc)
call BJDebugMsg("cast")
set loc=null
set u=null
endfunction
function InitTrig_SpellSurge takes nothing returns nothing
local trigger gg_trg_SpellSurge = CreateTrigger( )
local integer int = 0
loop
exitwhen int == bj_MAX_PLAYERS
call TriggerRegisterPlayerUnitEvent(gg_trg_SpellSurge,Player(int),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set int = int + 1
endloop
call TriggerAddCondition( gg_trg_SpellSurge, Condition( function Trig_SpellSurge_Conditions ) )
call TriggerAddAction( gg_trg_SpellSurge, function Trig_SpellSurge_Actions )
set gg_trg_SpellSurge = null
endfunction