put this bit:
x# = object position x(1)
y# = object position y(1)
z# = object position z(1)
position camera 1,x#-20,y#+30,z#
point camera 1,x#,y#,z#
in a function and call it something like 'UpdateCamera()'
now in your main loop (after movement code, and before sync) call the function.
I'd also put your movement code in a function too, then you main loop would lok like this:
Do
MoveCharacter()
UpdateCamera()
Loop.
So when all done looks like this:
REM Project: My First Program!
REM Created: 1/16/2007 4:33:38 PM
REM
REM ***** Main Source File *****
REM
Sync On
Sync Rate 60
Autocam ON
Hide Mouse
Load Image "moss05.jpg",1
Make Object Cube 1,2
Make Camera 1
Make Matrix 1, 100, 100, 100, 100
Prepare Matrix Texture 1,1,100,100
Color Object 1, RGB (255,0,0)
Randomize Matrix 1,10
Set Matrix Texture 1,1,1
Position Object 1, 50, 50, 0
Do
MoveCharacter()
UpdateCamera()
Sync
Loop
function UpdateCamera()
x# = object position x(1)
y# = object position y(1)
z# = object position z(1)
position camera 1,x#-20,y#+30,z#
point camera 1,x#,y#,z#
endfunction
function MoveCharacter()
If Upkey()=1 then Move Object 1,0.3
If Downkey()=1 then Move Object 1,-0.3
If Rightkey()=1 then Turn Object Right 1,1.2
If Leftkey()=1 then Turn Object Left 1,1.2
endfunction
The word "Gullible" cannot be found in any English Dictionary.