i put remarks into it so you can understand whats going on. I am guessing that you probably don't know what the newxvalue command does. If you dont then read up on it in the help files. It is a very very usefull command.
Anyway. You will need some way for the player to be able to turn the camera
so you add a new subroutine
add this:
gosub control_camera
after the:
gosub control_player
and ten add this subroutine:
control_camera:
camax#=wrapvalue(camax#+(mousemovey()/3))
camay#=wrapvalue(camay#+(mousemovex()/3))
rotate camera camax#,camay#,0
return
so overall this is what it shoudl look like:
Sync on
Sync rate 0
Hide mouse
Autocam off
rem make ground so that you can see where your going
make matrix 1,1000,1000,25,25
Do
rem display screen frame rate
set cursor 0,0
Print screen fps()
rem control_player
gosub control_player
gosub control_camera
Sync
Loop
rem subroutines
control_player:
rem remember the old posiitons(always usefull)
oldx#=x#
oldz#=z#
rem basic controls for forwards and backwards movement
If upkey()=1
x#=newxvalue(x#,camay#,5)
z#=newzvalue(z#,camay#,5)
Endif
If downkey()=1
x#=newxvalue(x#,camay#,-4)
z#=newzvalue(z#,camay#,-4)
Endif
rem strafing
If rightkey()=1
x#=newxvalue(x#,wrapvalue(camay#+90),3)
z#=newzvalue(z#,wrapvalue(camay#+90),3)
Endif
If leftkey()=1
x#=newxvalue(x#,wrapvalue(camay#+270),3)
z#=newzvalue(z#,wrapvalue(camay#+270),3)
Endif
position camera x#,100,z#
return
control_camera:
camax#=wrapvalue(camax#+(mousemovey()/3))
camay#=wrapvalue(camay#+(mousemovex()/3))
rotate camera camax#,camay#,0
return
If you dont understand any commands then study them.
If you are able ot continue this a few steps further on your own then thats great.
Everyone is a comedian...