HI! I got DB Pro a few days ago and it seems to be brill although it has a lot of bugs. I loaded a halflife map into DB and 4 some reason sometimes the camera either falls though the floor or goes through the wall. Might be a bug or just me, anyway, heres the code, feel free to use it and please inform me of any improvements i can make. Cheers
Rem Project: test
Rem Created: 15/09/02 16:23:33
Rem ***** Main Source File *****
sync on
sync rate 100
load bitmap "bitmaps\menu.bmp"
set text size 30
set text to bold
center text 400,340,"New Game"
center text 400,380,"Load Game"
center text 400,420,"Options"
center text 400,460,"Exit"
do
if spacekey()=1 then level#=1
if mode=0
if level#=1
hide mouse
cls
sync : center text screen width()/2,screen height()/2,"LOADING" : sync
backdrop on
color backdrop rgb(0,0,0)
load bsp "",".bsp"
position camera 0,70,12,55
set bsp camera collision 1,0,2,0
set bsp collision threshhold 1,0.01
level#=0
mode=1
endif
endif
rem --------------------mode1--------------------------------------------
if mode=1
rotate camera camera angle x(0)+(mousemovey()/2.0),camera angle y(0)+(mousemovex()/2.0),0
rem Control player movement
cx#=camera angle x(0) : cy#=camera angle y(0)
if upkey()=1 then xrotate camera 0,0 : move camera 0,0.2 : xrotate camera 0,cx#
if downkey()=1 then xrotate camera 0,0 : move camera 0,-0.15 : xrotate camera 0,cx#
if leftkey()=1 then yrotate camera 0,cy#-90 : move camera 0.2 : yrotate camera 0,cy#
if rightkey()=1 then yrotate camera 0,cy#+90 : move camera 0.2 : yrotate camera 0,cy#
if wrapvalue(camera angle x(0))>40 and wrapvalue(camera angle x(0))180 and wrapvalue(camera angle x(0))