my first post was about traversing multiple matrices and DR AV showed me how to do a bubblesort.
I found the script which was in the year 2000!
rem ** Get ground heights of all Matricies
for n=1 to num_mat
mx=matrix position x(n)
mz=matrix position z(n)
g#(n,1)=get ground height(n,xpos#-mx,zpos#-mz)
g#(n,2)=0
next n
rem ** Bubble sort
for n=1 to num_mat
for nn=num_mat to 1 step -1
if g#(n,1) > g#(nn,2)
g#(nn+1,2)=g#(nn,2)
g#(nn,2)=g#(n,1)
endif
next nn
next n
rem ** find ground that is under xpos,zpos
for n=num_mat to 1 step -1
if ypos# > g#(n,2) then real_ground#=g#(n,2)
next n
If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself