here you go....hope it helps
`3rd person view
`by zach turnlund
`setup
sync on
sync rate 30
autocam off
`make player object
make object cylinder 1,1
color object 1,rgb(0,0,255)
`make matrix to walk on
make matrix 1,100,100,10,10
randomize matrix 1,5
`main loop
do
`color backdrop cause i don't like blue
color backdrop 0
`variables
oldx#=object position x(1)
oldz#=object position z(1)
oldy#=get ground height(1,x#,z#)
`controls
if upkey()=1 then move object 1,1
if downkey()=1 then move object 1,-1
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+5)
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-5)
`position
x#=object position x(1)
z#=object position z(1)
y#=get ground height(1,x#,z#)
`pos cam
position object 1,x#,y#,z#
pay#=object angle y(1)
`this is the set camera to follow command. the first 3 variables
`are what you want the camera to follow. the 4th variable is the direction
`you want the camera to face. in this example, we want the camera to face
`the same way as the object we are following. the fifth variable if how far
`away you want the camera to stay from the object being followed. the 6th
`how high you want the camera to be. the 7th place is how the camera is
`smoothed(from 0 to 100). the last is to detect whether or not the camera
`is hitting a static collision box or not. hope it helped.
set camera to follow x#,y#,z#,pay#,10,10,3,1
point camera x#,y#,z#
`sync + loop
sync
loop
need any other help ask
bishop
"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."