i hate to say there are errors
i make a loop that never ends, is that alright?
JASS:
function a takes nothing returns nothing
local unit u
local integer i
local real x
local real y
local location l
local integer i2
local real w = 0
loop
set x = GetLocationX(GetRectCenter(gg_rct_1))
set y = GetLocationY(GetRectCenter(gg_rct_1))
set u = CreateUnit( player(1), 'hfoo', x, y, 0.)//syntax!!!
set x = GetLocationX(GetRectCenter(gg_rct_2))
set y = GetLocationY(GetRectCenter(gg_rct_2))
set l = Location(x, y)
call IssuePointOrderLocBJ( u, "attack", l )
call RemoveLocation( l )
set l = null
set u = null
if i2 == 3 then
set x = GetLocationX(GetRectCenter(gg_rct_1))
set y = GetLocationY(GetRectCenter(gg_rct_1))
set u = CreateUnit( Player(1), 'hrif', x, y, 0.)
set x = GetLocationX(GetRectCenter(gg_rct_2))
set y = GetLocationY(GetRectCenter(gg_rct_2))
set l = Location(x, y)
call IssuePointOrderLocBJ( u, "attack", l )
call RemoveLocation( l )
set u = null
set l = null
set i2 = 0
set w = 30
else
endif
exitwhen i == 5
set i = 0
set i2 = i2 + 1
call TriggerSleepAction( w )
endloop
endfunction
function InitTrig_a takes nothing returns nothing
set gg_trg_a = CreateTrigger( )
call TriggerAddAction( gg_trg_a, function a )
endfunction
i make a loop that never ends, is that alright?