Ignore that!!! left a texture command in...
here you go:
rem ===========================================
rem MATRIX WALKING AND FOLLOWING
rem ===========================================
rem this moves a sphere on a matrix and a cube
rem to follow the sphere, also on the matrix.
rem -------------------------------------------
rem Make a simple scene for the camera to look at
make matrix 1,10000.0,10000.0,25,25
randomize matrix 1,50.0
set matrix height 1,12,12,300.0
update matrix 1
rem Create blob character to follow
make object sphere 1,100.0
rem Create cube to folow blob character
make object cube 2,90.0
rem Set variables for character position
x#=500
z#=500
rem Activate manual sync
sync on
rem Begin loop
do
rem Control camera with arrow keys
if upkey()=1 then x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10)
if downkey()=1 then x#=newxvalue(x#,a#,-10) : z#=newzvalue(z#,a#,-10)
if leftkey()=1 then a#=wrapvalue(a#-10.0)
if rightkey()=1 then a#=wrapvalue(a#+10.0)
rem Update character
y#=get ground height(1,x#,z#)+50.0
position object 1,x#,y#,z#
yrotate object 1,a#
rem Set variables for cube position
2x#=Object position x(2)
2z#=Object position z(2)
rem Update cube
2y#=get ground height(1,2x#,2z#)+50.0
position object 2,2x#,2y#,2z#
rem Position camera to the back of the character
cx#=newxvalue(x#,wrapvalue(a#+180),300)
cz#=newzvalue(z#,wrapvalue(a#+180),300)
cy#=get ground height(1,cx#,cz#)+100.0
position camera cx#,cy#,cz#
rem Point camera at object
point camera x#,y#,z#
rem Point cube at object
point object 2,x#,y#,z#
rem move the cube
move object 2,5
rem Syncronise
sync
rem End loop
loop
P.S. this is for Dark Basic Classic, but it might work in pro.
P.P.S. It does work in Pro ( yay ), I only have the trial version which will runout in two days( aww )...
Infra-Dark