- Joined
- Sep 12, 2008
- Messages
- 657
How do i use region as a rect?
how do i use region as the rect?
Btw: GetRegionCenter() dont exist, thats why i need help.
***************nevermind, found another solution.**************
JASS:
function X takes unit u, real t, integer p, region r returns nothing
local rect DRect = Rect(0, 0, 0, 0)
if ST[1] >= 1 then
call SetUnitFlyHeight(u, 0, GetUnitFlyHeight(u) / t)
call MoveRectToLoc(DRect, GetRegionCenter(r))
call SetUnitPositionLoc(u, GetRectCenter(DRect))
set ST[1] = ST[1] - 1
endif
endfunction
how do i use region as the rect?
Btw: GetRegionCenter() dont exist, thats why i need help.
***************nevermind, found another solution.**************