//TESH.scrollpos=0
//TESH.alwaysfold=0
function circleLoop takes nothing returns nothing
local integer i = 0
local real x
local real y
loop
set i = i+1
exitwhen i > udg_circleAmount
set x = udg_circleCenterX[i] + udg_circleOffset[i] * Cos(udg_circleDegrees[i] * 0.017453292)
set y = udg_circleCenterY[i] + udg_circleOffset[i] * Sin(udg_circleDegrees[i] * 0.017453292)
call SetUnitX(udg_circleUnit[i], x)
call SetUnitY(udg_circleUnit[i], y)
set udg_circleDegrees[i] = udg_circleDegrees[i] + udg_circleSpeed[i]
endloop
endfunction
function createCircle takes nothing returns nothing
set udg_circleAmount = udg_circleAmount + 1
set udg_circleOffset[udg_circleAmount] = udg_circleOffset[0]
set udg_circleDegrees[udg_circleAmount] = udg_circleDegrees[0]
set udg_circleSpeed[udg_circleAmount] = udg_circleSpeed[0]
set udg_circleCenterX[udg_circleAmount] = GetLocationX(udg_circleCenterLoc)
set udg_circleCenterY[udg_circleAmount] = GetLocationY(udg_circleCenterLoc)
set udg_circleUnit[udg_circleAmount] = udg_circleUnit[0]
if udg_circleAmount == 1 then
call TimerStart(udg_circleTimer, .03, true, function circleLoop)
endif
call RemoveLocation(udg_circleCenterLoc)
endfunction
Name | Type | is_array | initial_value |
ButtonDialog | button | Yes | |
ButtonMenu | dialog | No | |
circleAmount | integer | No | |
circleCenterLoc | location | No | |
circleCenterX | real | Yes | |
circleCenterY | real | Yes | |
circleDegrees | real | Yes | |
circleOffset | real | Yes | |
circleSpeed | real | Yes | |
circleTimer | timer | No | |
circleUnit | unit | Yes | |
GSS_Spawn | location | No | |
GSS_TempUnit | unit | No | |
GSS_TmpPlayer | player | No | |
PlayerGroep | force | No | |
Timer | timer | No | |
UnitGroep | group | No |