Hi!
Im making a gridsystem on the "ground" in my game. Every unit should hold a different value (1,2 or 3. Grass, sand or water). Every unit should have the value 1 on start, though.
So its like:
MapX = 128
MapZ = 128
Make Object Box 1,MapX,2,MapZ
DeclareMap(MapX,MapZ)
And then the DeclareMap() function:
Function DeclareMap(X,Z)
nrOfGrids = X+Z
dim MapGrid(nrOfGrids)
for currentX=1 to X
for currentY=1 to Y
MapGrid(currentX,currentY,1)
next Y
next X
endFunction
Now something is clearly wrong in the DeclareMap() function. Can someone tell me whats wrong?
Thanks in advance!