- Joined
- Jun 7, 2008
- Messages
- 440
Ive been trying to figure this out for a little while now, while I know this is kinda getting redundant, I'm really not sure why this syntaxed.
I have not posted the entire trigger, due to the fact that the syntax has already appeared. The variables have been nullified.
Another question : It was said that reals dont leak. Does that include coordinates for Rects?
JASS:
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local group g = CreateGroup()
local real array x
local real array y
local location array t
set x [0] = (GetRandomReal(GetRectMinX(gg_rct_Start_2), GetRectMaxX(gg_rct_Start_2)))
set x [1] = (GetRandomReal(GetRectMinX(gg_rct_End_2), GetRectMaxX(gg_rct_End_2)))
set y [0] = (GetRandomReal(GetRectMinY(gg_rct_Start_2), GetRectMaxY(gg_rct_Start_2)))
set y [1] = (GetRandomReal(GetRectMinY(gg_rct_End_2), GetRectMaxY(gg_rct_End_2)))
set t [0] = Location(x[0],y[0])
set t [1] = Location(x[1],y[1])
if udg_Lives[GetPlayerId(Player(1))] > 0 then
if p != Player(1) then
call SetUnitPositionLoc(u, t[0])
IssuePointOrderLoc( u, "move" , t[1])//<<<<My Syntax (My Location Syntaxed)
elseif p == Player(1) then
call SetUnitPositionLoc(u, t [1])
endif
endif
I have not posted the entire trigger, due to the fact that the syntax has already appeared. The variables have been nullified.
Another question : It was said that reals dont leak. Does that include coordinates for Rects?