exge
New Member
- Reaction score
- 15
i get only 1 error ' expected .. what does that mean
DummyCastAOE and Explosion are custom functions .. so dont bother explaining to me about them .. thx
PHP:
function Trig_irradiate_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A04Q'
endfunction
function checktargets takes unit caster returns boolean
return ( IsUnitEnemy(GetEnumUnit(), GetOwningPlayer(caster)) == true )
endfunction
function damage takes unit caster returns nothing
call UnitDamageTargetBJ( caster, GetEnumUnit(), 500, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_irradiate_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local location targetloc = GetSpellTargetLoc()
local location casterloc = GetUnitLoc(caster)
local location tryloc = casterloc
local real angle = AngleBetweenPoints(casterloc,targetloc)
local integer base = 0
local integer range = 100
loop
set tryloc = PolarProjectionBJ(tryloc, 20, angle)
call AddSpecialEffectLocWithTimer(tryloc, "Abilities\\Spells\\NightElf\\CorrosiveBreath\\CorrosiveBreathMissile.mdl", 1.0 )
exitwhen DistanceBetweenPoints(tryloc,targetloc) <= 10
endloop
call PolledWait(1)
call DummyCastAOE(caster,'A04M',"thunderclap")
call ForGroupBJ( GetUnitsInRangeOfLocMatching(512, targetloc, Condition(function checktargets(caster))), function damage(caster))
loop
call Explosion(targetloc,"Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl",250,base,range)
exitwhen base == 600
set base = base+100
set range = range+100
call PolledWait(0.1)
endloop
endfunction
//===========================================================================
function InitTrig_irradiate takes nothing returns nothing
set gg_trg_irradiate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_irradiate, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_irradiate, Condition( function Trig_irradiate_Conditions ) )
call TriggerAddAction( gg_trg_irradiate, function Trig_irradiate_Actions )
endfunction
DummyCastAOE and Explosion are custom functions .. so dont bother explaining to me about them .. thx