I got a small script to create the basic layout for the 'maze' but it acts weird in the middle of the map:
Look at the attached image. I added locust to the towers so they aren't automatically moved by creation when the space is too small between them, but still they aren't in the correct position.
Look at the attached image. I added locust to the towers so they aren't automatically moved by creation when the space is too small between them, but still they aren't in the correct position.
JASS:
globals
constant integer X_LENGTH=14
constant integer Y_LENGTH=14
constant real BLOCKER=64. //half of the towers pathing map size (its the standard guard tower, tested this value by DistanceBetweenUnits )
// location array center
// rect array fields
player mazeowner=Player(4)
// group DUMMYGROUP=CreateGroup()
endglobals
private function Trig_Field_Actions takes nothing returns nothing
local real factor =400.
local real startX=GetRectMinX(bj_mapInitialPlayableArea)+factor
local real endX=GetRectMaxX(bj_mapInitialPlayableArea)
local real startY=GetRectMaxY(bj_mapInitialPlayableArea)-factor
local real endY=GetRectMinY(bj_mapInitialPlayableArea)
local real x
local real y
local integer modX
local integer modY
set modY=1
set y=startY
loop
set x=startX
set modX=1
loop
if y==startY or x==startX or y==startY-Y_LENGTH*2*BLOCKER or x==startX+X_LENGTH*2*BLOCKER or (ModuloInteger(modX,2)==1 and ModuloInteger(modY,2) ==1 )then
call CreateUnit(mazeowner,039;h000039;,x,y,90.)
//creates a wall on the north west east and south and every two fields in the middle, look at the image
endif
set x=x+2*BLOCKER //im constantly adding this, but at the middle it seems to be lower for the game than it really is ?!
set modX=modX+1
exitwhen x>startX+X_LENGTH*2*BLOCKER
endloop
set modY=modY+1
set y=y-2*BLOCKER
exitwhen y<startY-Y_LENGTH*2*BLOCKER
endloop
endfunction