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.

Newcomers DBPro Corner / Key numbers ?

Author
Message
zencreator03
21
Years of Service
User Offline
Joined: 11th Jul 2003
Location:
Posted: 16th Jul 2003 23:52
Where can i find all the numbers for every key on the keyboard, as i am tryin to make a 4 player game and i only know UPKEY()SPACEKEY()DOWNKEY()LEFT,RIGHT ETC How do i utilise other keys ?Thankyou
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 17th Jul 2003 00:03
DO
CLS
Print Scancode()
LOOP

When running this code - press the desired key and a number will print. Then, use that number in the KEYSTATE command. Example

If keystate(16)=1 then END

If you press "Q" then END.

RPGamer

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!
zencreator03
21
Years of Service
User Offline
Joined: 11th Jul 2003
Location:
Posted: 17th Jul 2003 00:25
Thnkyou it saved me great hassle, thanks.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 17th Jul 2003 01:42
Everyone does it the hard way!

Here are all the key constants, straight from the DirectX help files.

Just use them like this:

JamesBlond
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Germany
Posted: 17th Jul 2003 15:56
for characters you could also use inkey$



Smile and be happy, things could be worse!
So I smiled and was happy, and things got worse...
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 17th Jul 2003 16:09
Ian - Never knew that way! Thanks

RPGamer

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 18th Jul 2003 07:09


I printed out this picture and just keep it on my desk, helps me alot.
CTP
k0shi
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location: Cyberspace
Posted: 18th Jul 2003 08:30
or this ..

famous last words-
Learn as if youll live forever, and give as if youll die tomorrow.
Yuri
21
Years of Service
User Offline
Joined: 12th Jun 2003
Location: Italy
Posted: 18th Jul 2003 13:43
how can obitain the scancodes of function keys? (f1,f2,f3...)

CBMZone main administrator
http://www.cbmzone.com
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Jul 2003 15:14
You can either look for the constants DIK_F? in the code I posted above, or look at CTP's piccy.

Login to post a reply

Server time is: 2024-11-24 22:44:56
Your offset time is: 2024-11-24 22:44:56