function GroupFor takes nothing returns nothing
//Actions//
//Example//
call KillUnit(GetEnumUnit()) //Kills the picked unit//
endfunction
function Forgroup takes nothing returns nothing
local group g = CreateGroup()
call ForGroup(g,function GroupFor)
call DestroyGroup(g)
set g = null
endfunction
native GroupEnumUnitsInRect takes group whichGroup, rect r, boolexpr filter returns nothing
native GroupEnumUnitsOfPlayer takes group whichGroup, player whichPlayer, boolexpr filter returns nothing
native GroupEnumUnitsOfType takes group whichGroup, string unitname, boolexpr filter returns nothing
ive GroupEnumUnitsSelected takes group whichGroup, player whichPlayer, boolexpr filter returns nothing
function XFrostNova takes nothing returns nothing
//===== @Variable Declaration @ =====
local unit Caster
local location CastingPoint
local group Dummies
local group Damaged
local real Damage
local real Angle
local real MaxAoE
local real CurrentAoE
local player OwningPlayer
//===== @SetUp @ =====
set Caster = GetTriggerUnit()
set CastingPoint = GetUnitLoc(Caster)
set Damage = GetUnitAbilityLevel(Caster, 039;A000039;) * 50 + GetUnitLevel(Caster)
set MaxAoE = GetUnitAbilityLevel(Caster, 039;A000039;) * 400 + GetUnitLevel(Caster)
set CurrentAoE = 100
set Angle = 45
set OwningPlayer = GetOwningPlayer(Caster)
//===== @UnitScript Actions@ =====
loop
exitwhen CurrentAoE - 100 >= MaxAoE
call CreateNUnitsAtLocFacingLocBJ(1, 039;h000039;, OwningPlayer, PolarProjectionBJ(CastingPoint, CurrentAoE, Angle), null)
call GroupAddUnit(Dummies, GetLastCreatedUnit())
set CurrentAoE = CurrentAoE + 80
if Angle > 315 then
set Angle = 45
else
call DoNothing()
endif
endloop
call ForGroup(Dummies, UnitApplyTimedLife(GetEnumUnit(), 039;BTLF039;, 10.00))
endfunction
function Timed_For_Group takes nothing returns nothing
call UnitApplyTimedLife(GetEnumUnit(), 039;BTLF039;, 10.00)
endfunction
function Your_Function takes nothing returns nothing
// ... Blah, blah, blah...
call ForGroup(Some_Group, function Timed_For_Group)
// ... Blah, blah, blah...
endfunction