Code
function Trig_Slider_Filter takes nothing returns boolean
local unit f = GetFilterUnit()
local real x = GetWidgetX(f) + 35. * Cos(GetUnitFacing(f) * .017)
local real y = GetWidgetY(f) + 35. * Sin(GetUnitFacing(f) * .017)
call SetUnitX(f,x)
call SetUnitY(f,y)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl",GetWidgetX(f),GetWidgetY(f)))
call UnitDamagePoint(f,0.,30.,GetWidgetX(f),GetWidgetY(f),100.,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set f = null
return false
endfunction
function Trig_Slider_Actions takes nothing returns nothing
call GroupEnumUnitsInRect(udg_TempGroup,gg_rct_Slide,Filter(function Trig_Slider_Filter))
endfunction
Создай глобальную переменную TempGroup типа Отряд.