Posted: 15th Feb 2003 1:23
I don't know how useful this will be to any one, you might be able to do this with adding limbs or something but I haven't really done that yet.

+ Code Snippet
rem positioning other objects so they stay in the same place
rem relative to you
rem I've used Dark basic camera example 4 for this

rem Make a simple scene for the camera to look at
make matrix 1,10000.0,10000.0,25,25
load bitmap "texture.bmp",1
get image 1,0,0,64,64
delete bitmap 1
prepare matrix texture 1,1,2,2
randomize matrix 1,50.0
set matrix height 1,12,12,300.0
update matrix 1

rem Create blob character to follow

make object cone 1,100.0
xrotate object 1,180
rem use cylinders, or import your own wheels
rem if you make wheels in milkshape you can get then to turn
make object sphere 2,200.0
make object sphere 3,200.0
rem Set variables for character position
x#=2500
z#=2500

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 Position camera to the back of the character
ca#=wrapvalue(a#)
cx#=newxvalue(x#,wrapvalue(ca#+180),300)
cz#=newzvalue(z#,wrapvalue(ca#+180),300)

rem notice the distances (600 here) and the angles 45 & 315
rem are the same for each wheel, other wise they will wobble!
rem this is the important bit, the camera always stays 
rem the same distance away from the object, so if you do the same 
rem with with each wheel they should as well
rem wheel 1
w1x#=newxvalue(x#,wrapvalue(ca#+45),600)
w1z#=newzvalue(z#,wrapvalue(ca#+45),600)
rem wheel 2
w2x#=newxvalue(x#,wrapvalue(ca#+315),600)
w2z#=newzvalue(z#,wrapvalue(ca#+315),600)

rem camera
cy#=get ground height(1,cx#,cz#)+100.0
position camera cx#,cy#+30,cz#

rem position other object(s) in the same way as camera

rem wheel 1, 2
position object 2,w1x#,y#,w1z#
position object 3,w2x#,y#,w2z#
yrotate object 2, wrapvalue(ca#)
yrotate object 3, wrapvalue(ca#)
yrotate camera wrapvalue(ca#)

rem Syncronise
sync

rem End loop
loop


ps can any one tell me how to put pictures up
thanks