I thought of that but it didn't work. I'll give you my code... please take a look.
rem **************************
rem ** DEMO **
rem ** Created By: **
rem ** Martin vanPutten **
rem **************************
rem ******************************************************************
rem * # Variables
rem ******************************************************************
rem * player = Player.
rem * PushEnterToBegin = Creates A Wait Period Until ENTER Is Pushed.
rem * playerY = Players Y Value.
rem * x = X Value.
rem * z = Z Value.
rem * cameraX = Cameras X Value.
rem * cameraZ = Cameras Z Value.
rem ******************************************************************
rem ******************************************************************
rem * $ Variables
rem ******************************************************************
rem * player = Your Characters Name.
rem ******************************************************************
rem Setup Introduction.
hide mouse
rem Start Introduction.
cls
center text screen width() / 2, screen height() / 2 - 20, "DEMO"
sleep 1000
center text screen width() / 2, screen height() / 2, "Created By: Martin vanPutten"
sleep 1000
center text screen width() / 2, screen height() / 2 + 20, "Loading"
sleep 5000
cls
center text screen width() / 2, screen height() / 2 - 10, "What is your name?"
set cursor screen width() / 2 - 115, screen height() / 2 + 100
print "..."
set cursor screen width() / 2 - 100, screen height() / 2 + 100
input player$
cls
set cursor screen width() / 2 - 150, screen height() / 2 - 100
print "Welcome to DEMO " ;player$; "!"
set cursor screen width() / 2 - 150, screen height() / 2 - 80
print "This is a brief example of what"
set cursor screen width() / 2 - 150, screen height() / 2 - 60
print "DarkBASIC is capable of. Feel"
set cursor screen width() / 2 - 150, screen height() / 2 - 40
print "free to interact with the objects."
set cursor screen width() / 2 - 150, screen height() / 2 - 20
center text screen width() / 2, screen height() / 2 + 50, "~~Push ENTER To Begin~~"
input PushEnterToBegin#
rem Setup Environment.
show mouse
autocam off
sync on
rem Status Bar
line 20, 250, 16, 280
rem Prepare Ground For The Matrix.
Load bitmap "Ground.bmp", 1
Get Image 1, 1, 1, 128, 128
Delete Bitmap 1
rem Create Ground.
Make Matrix 1, 10000, 10000, 15, 15
Prepare Matrix Texture 1, 1, 1, 1
rem Load Charecter.
load object "idle.x", 1 : append object "walk.x", 1, 100
yrotate object 1, 180 : fix object pivot 1
position object 1, 10000, 5000, 10000
loop object 1, 0, 20 : set object speed 1, 5
rem Game Loop.
do
rem Variables.
playerY# = Object angle Y(1)
rem Player Movement.
stage = 0
if Leftkey() = 1 then player# = player# - 9.0 : player# = wrapvalue(playerY# - 4.5)
if Rightkey() = 1 then player# = player# + 9.0 : player# = wrapvalue(playerY# + 4.5)
if Upkey() = 1 then x# = NewxValue(x#, player#, +12) : z# = NewzValue(z#, player#, +12) : stage = 1
if Downkey() = 1 then x# = NewxValue(x#, player#, -12) : z# = NewzValue(z#, player#, -12) : stage = 1
position object 1, x# + 5000, 0.0, z# + 5000
yrotate object 1, player#
rem Controling Player Animation.
if stage <> oldstage
if stage = 0
set object frame 1, 0.0
loop object 1, 0, 20
set object speed 1, 10
endif
if stage = 1
set object frame 1, 105.0
loop object 1, 105, 125
set object speed 1, 40
endif
oldstage = stage
endif
rem Camera Control.
cameraZ# = Newzvalue(z# + 5000, playerY# - 180, 300)
cameraX# = Newxvalue(x# + 5000, playerY# - 180, 300)
Position Camera cameraX#, 150, cameraZ#
Point camera x# + 5000, 150, z# + 5000
rem Boundaries.
if x < 0 then x = 0
if x > 10000 then x = 10000
if z < 0 then z = 0
if z > 10000 then z = 10000
rem Refresh Screen.
sync
rem End Game Loop.
loop
~Live And Let Learn~