- Joined
- May 11, 2007
- Messages
- 54
I try to create a spell from chain lightning that deals AoE damage to the first target without dealing damage to the allies of the casting unit, with this
Can someone tell me why doesn't the AoE damage work? Plz reply soon!
JASS:
function Trig_Spell_AoE_Damage_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function Trig_Spell_AoE_Damage_Func006001003 takes nothing returns boolean
return IsUnitAlly(GetEnumUnit(),GetOwningPlayer(GetSpellAbilityUnit())) == true
endfunction
function Trig_Spell_AoE_Damage_Func006A takes nothing returns nothing
call SetUnitLifeBJ(GetEnumUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit())+( 150*udg_FlameTouchLevel)))
endfunction
function Trig_Spell_AoE_Damage_Actions takes nothing returns nothing
local location l = GetUnitLoc(GetSpellTargetUnit())
set udg_FlameTouchLevel = GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetSpellAbilityUnit())
call UnitDamagePointLoc(GetSpellAbilityUnit(),0,300,l,(150* udg_FlameTouchLevel),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call ForGroupBJ( GetUnitsInRangeOfLocMatching(300.00,l,Condition(function Trig_Spell_AoE_Damage_Func006001003)),function Trig_Spell_AoE_Damage_Func006A)
call RemoveLocation(l)
set l = null
endfunction
function InitTrig_Spell_AoE_Damage takes nothing returns nothing
set gg_trg_Spell_AoE_Damage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spell_AoE_Damage, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Spell_AoE_Damage, Condition( function Trig_Spell_AoE_Damage_Conditions ) )
call TriggerAddAction( gg_trg_Spell_AoE_Damage, function Trig_Spell_AoE_Damage_Actions )
endfunction
Can someone tell me why doesn't the AoE damage work? Plz reply soon!
Last edited by a moderator: