Well, I've been working on a FPS(it's not my first game, so I do know some coding, don't worry...just not a lot), and I have two big obstacles, shooting multiple visible bullets at the same time(which I'm talking about in another topic) and Sidestepping, or strafing. I use DBC, so I can't use the simple "move left" command, so I don't know where to go from here. My coding right now looks like this...
if keystate(17)=1 then move object 2,10
if keystate(31)=1 then move object 2,-10
if keystate(30)=1
turn object left 2,90
move object 2,8
turn object right 2,90
endif
if keystate(32)=1
turn object right 2,90
move object 2,8
turn object left 2,90
endif
I know, it's sloppy, and on top of that, it doesn't seem to work when my object is turned. I have it continually facing the way my camera(controlled by my mouse) is facing with this code...
rotate object 2,0,camera angle y(),0
And so it's supposed to face the way the camera does in terms of left and right, then based on that, move left and right if you press "A" and "D". It does move forward when I tell it to, but for some reason, it won't strafe properly, and it seems to move left and right based on the direction it pointed when the game started, not the current direction. Can anyone help, or should I post more of my code?
Pineapple juice, the best drink ever made.