Cokemonkey11
New Member
- Reaction score
- 18
JASS:
globals
unit slideUnit
integer i
endglobals
function moveInCircle takes nothing returns nothing
local location currentPos = GetUnitLoc(slideUnit)
local location currentPosOff
local real posOffX
local real posOffY
set i = (R2I(GetUnitFacing(slideUnit)))
set currentPosOff = PolarProjectionBJ(currentPos,10,i)
set posOffX = GetLocationX(currentPosOff)
set posOffY = GetLocationY(currentPosOff)
call SetUnitX(slideUnit,posOffX)
call SetUnitY(slideUnit,posOffY)
endfunction
function Trig_dummyCenter_Actions takes nothing returns nothing
local timer time = CreateTimer()
set slideUnit = CreateUnitAtLoc(Player(0),039;hfoo039;,GetRectCenter(gg_rct_regionTemp),270)
set i = 270
call TimerStart(time,.03,true,function moveInCircle)
endfunction
function hoverCar takes nothing returns nothing
set gg_trg_hoverCar = CreateTrigger()
call TriggerRegisterTimerEvent(gg_trg_hoverCar,2,false)
call TriggerAddAction(gg_trg_hoverCar, function Trig_dummyCenter_Actions)
endfunction
nothing seems to happen - specifically the unit doesnt get spawned.
When I go to syntax check it tells me gg_rct_regionTemp isn't specified but when i create a gui trigger with it and convert to custom text it does the same, so I assume that's not the problem.
Any help appreciated.