Hey, i just got DBPRO yesterday and have been playing around with it alot. so i decided that i wanted to make a racing game. i started making the script and reading lots of tutorials this is what i got,
Rem Simple car test
Sync On
CLS 0
Hide Mouse
Make Matrix 1,500,900,20,20
rem load object "C:Program FilesThe Game CreatorsFPS CreatorFilesentitybankeai_crownvicCrownvic.X", 1
make object box 1, 100
scale object 1, 55 ,55,55
Position Object 1,250,Get Ground Height(1,250,250)+1.0,250
Camdist# = 250.0
TrackAngle = 180: Rem 0 - Behind, 180 - Front, 90 & 270 - Sides
ReqCamHeight# = 5.0
Camsmooth = 200
ColFlag = 0
Speed#=0.0
Do
If keystate(46)=1 then camdist# = 140.0
If keystate(45)=1 then camdist# = 250.0
if keystate(44)=1 then trackangle = 360
if keystate(44)=0 then trackangle = 180
rem MMx = MouseMoveX()
rem Y# = WrapValue(Object Angle Y(1)+MMx): Yrotate Object 1,Y#
If LeftKey()=1 Then Y# = WrapValue(Object Angle Y(1)-.15): Yrotate Object 1,Y#
If RightKey()=1 Then Y# = WrapValue(Object Angle Y(1)+.15): Yrotate Object 1,Y#
if upkey()=1 and speed#<2.0 then speed#=speed#-0.4
if Downkey()=1 and speed#>-1.0 then speed#=Speed#+0.2
move object 1, speed#
ObjX# = Object Position X(1): ObjZ# = Object Position Z(1)
ObjHeight# = Get Ground Height(1,ObjX#,ObjZ#)+100
Position Object 1,ObjX#,ObjHeight#+1.0,ObjZ#
Camheight# = ObjHeight#+ReqCamHeight#
Set Camera To Follow ObjX#,ObjHeight#,ObjZ#,WrapValue(Object Angle Y(1)+TrackAngle),Camdist#,Camheight#,Camsmooth,ColFlag
Center Text 320,0,"Beta Build 0.01034"
Sync
Loop
REM Project: car2
REM Created: 6/17/2008 5:10:45 PM
REM
REM ***** Main Source File *****
REM
REM ***** Main Source File *****
REM
now the basic idea is the car can be driven with the arrow keys and the camera will follow, i got that working but then i wanted to add acceleration so i added that but now it doesn't work, when ever i try to go any where it go really fast straight ahead. please help!
"The Beginning is the end."