Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / w ,a ,s ,d keys movement help, how do i program them as the movement keys ?????????? help meeeeee!!!!!!!!!!!!!1

Author
Message
X GAMER
21
Years of Service
User Offline
Joined: 20th May 2004
Location:
Posted: 23rd Jul 2004 04:57
how do i program the w,a,s,d for movement of a person in a 3 d world as in a first person shooter? please help me.
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 23rd Jul 2004 05:12
Use the keystate function

if keystate(number of key)=1 then:


keystate number: 17=W, 30=A, 31=S, 32=D

sarin
21
Years of Service
User Offline
Joined: 20th Mar 2004
Location: nowhere
Posted: 23rd Jul 2004 08:54
yeah, but a little note here: the w a s d commands r normally not used for movement, as u cant go automatically diagonal in any way, unlike the upkey and downkey and left-right key commands.

anyone no how to do this?

Sarin
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 23rd Jul 2004 09:00
sarin, how many FPS games have you played?
You can go diagonal in that way.

xmove = 0 - keystate(30) + keystate(32)
zmove = 0 - keystate(31) + keystate(17)

position object 1, object position x(1)+xmove, 0, object position z(1)+zmove

X GAMER
21
Years of Service
User Offline
Joined: 20th May 2004
Location:
Posted: 23rd Jul 2004 10:02
thanks a lot guys.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 23rd Jul 2004 11:01
XGamer,
Please do not post with so many Question marks and exclamation points in your thread title again.

Your thread title could have simply been summarised to "W,A,S,D movement - How can it be done?"

Thanks,
Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-25 04:59:19
Your offset time is: 2025-05-25 04:59:19