Well, there is a conundrum... and let me explain it by showing you the following code. My conundrum will become clearer after you've studied it...
for mat=0 to 7
make matrix 1+mat,512,512,32,32
position matrix 1+mat,0,-2,512*mat
prepare matrix texture 1+mat,1,33,33
set matrix texture 1+mat,2,1
next mat
set current bitmap 1
lock pixels
tile_count=1
for tile_z=0 to 31
for tile_x=0 to 31
column=point(tile_x,tile_z)
height#=rgbr(column)/4.0
for mat=0 to 7
set matrix height 1+mat,tile_x,tile_z,height#
set matrix tile 1+mat,31-tile_x,tile_z,tile_count
next mat
inc tile_count
next tile_x
inc tile_count
next tile_z
unlock pixels
delete bitmap 1
for mat=0 to 7
update matrix 1+mat
next mat
set current bitmap 0
There. Now, what I wonder is this. I have no love of flying. Not in this gamelet anyway. But that is what the camera is doing. It is flying all over the place.
I do have the remedy for it. I have a snippet ready to yank the camera back to earth, but that snippet uses
get ground height(). But to be able to use that, I need to know which matrix I'm in.
As you saw from the loop, the program creates seven chained matrixes, and the camera is moving all over the place. Now I KNOW it's something very silly and simple, and I'm going to feel very stupid afterwards, but how do I find out -- easily -- in what matrix I am so that I can paste the matrix number into the
get ground height() function?
I'll kiss your feet if you can answer. I've been trying to figure this out all day.
-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----