AOE Holy Light : Solved
So basically, I'm new to Jass - and I got a problem I can't solve.
My idea: Whenever a unit is casting "Holy Light" on a target,
the area around the target will be healed with Holy Light.
So basically, I'm new to Jass - and I got a problem I can't solve.
My idea: Whenever a unit is casting "Holy Light" on a target,
the area around the target will be healed with Holy Light.
JASS:
function Trig_Holy_Light_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A018' ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Light_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local location target = GetSpellTargetLoc()
local group ally_group = CreateGroup()
local unit temp
call GroupEnumUnitsInRangeOfLoc(ally_group, target, 500, null)
loop
set temp = FirstOfGroup(ally_group)
exitwhen (temp == null)
if ( not (IsUnitAlly(temp, GetOwningPlayer(temp)) )) then
call GroupRemoveUnit(ally_group, temp)
else
call CasterCastAbility(GetOwningPlayer(caster), 'A018', "?????", temp)
call GroupRemoveUnit(ally_group, temp)
endif
endloop
endfunction
//===========================================================================
function InitTrig_Holy_Light takes nothing returns nothing
set gg_trg_Holy_Light = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Holy_Light, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Holy_Light, Condition( function Trig_Holy_Light_Conditions ) )
call TriggerAddAction( gg_trg_Holy_Light, function Trig_Holy_Light_Actions )
endfunction
Last edited: