This might be useful to anyone who can't figure out matrix terrains, or as a simple way to make levels. Basically, you load an image, make a matrix and run the function to set all the matrix heights. It's in it's early stages, so if anyone has any comments/suggestions please say so.
+ Code Snippetfunction matrix_heightmap(matnumber,imgnumber,x,y,scale)
make memblock from image 1,imgnumber
k=0
for i=0 to x
for j=0 to y
`text i*10,(y-j)*10,str$((memblock word(1,12+(k*2)))*scale)
set matrix height matnumber,j,(x-i),(memblock word(1,12+(k*2)))*scale
k=k+1
next j
next i
endfunction
Matnumber is the matrix number, imgnumber is the image number, x and y are the width and depth of the matrix and scale is the amount the height is to be scaled by. I haven't managed to scale the built in terrain commands, so I find this more useful. Remember the image has to be one bigger than the matrix grid size in each direction, for example if you had a 50x50 matrix, the image would have to be 51x51 pixels.
As yet there's no tilemapping function, I might make that soon, and then an editor to integrate the functions and produce images.