Hi all,
I'm pretty new to DBP.
I followed, read the last 7days tutorials and wrote everything down that I though was important.
So after 7days I began to program my first FPS game.
Everything is running fine but today I bumped into a small problem.
If I use the arrow keys to move around everything is fine.
So if I press left arrowkey and up arrowkey, the screen goes left and up.
I know that when people are playing they prefer to use the q,s,z,w buttons so I changed that and now when I try to press q to go strafe left and z to go up at the same time the screen only goes in 1 direction, either up or either strafe left.
Hope I explained everything well.
notes: I used the syn on and sync rate 0 to prevent lag.
I'll also post my code to move around.
playercontrols:
cameraposx = CAMERA POSITION X()
cameraposy = CAMERA POSITION Y()
cameraposz = CAMERA POSITION Z()
IF UPKEY() = 1
cameraposz = cameraposz + 1
POSITION CAMERA cameraposx, cameraposy, cameraposz
ENDIF
IF DOWNKEY() = 1
cameraposz = cameraposz - 1
POSITION CAMERA cameraposx, cameraposy, cameraposz
ENDIF
IF LEFTKEY() = 1
cameraposx = cameraposx - 1
POSITION CAMERA cameraposx, cameraposy, cameraposz
ENDIF
IF RIGHTKEY() = 1
cameraposx = cameraposx + 1
POSITION CAMERA cameraposx, cameraposy, cameraposz
ENDIF
IF INKEY$() = lower$("z")
cameraposz = cameraposz + 1
POSITION CAMERA cameraposx, cameraposy, cameraposz
ENDIF
IF INKEY$() = lower$("s")
cameraposz = cameraposz - 1
POSITION CAMERA cameraposx, cameraposy, cameraposz
ENDIF
IF INKEY$() = lower$("q")
cameraposx = cameraposx - 1
POSITION CAMERA cameraposx, cameraposy, cameraposz
ENDIF
IF INKEY$() = lower$("d")
cameraposx = cameraposx + 1
POSITION CAMERA cameraposx, cameraposy, cameraposz
ENDIF
RETURN
Thanks in advantage.
Windows Vista and Ubuntu 7.10 on Toshiba Satellite L40 - Dual core 1.86Ghz - 1024MB RAM - 120GB HD - ADSL Connection