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.

Code Snippets / [DBP] Keyboard Keystate Constants

Author
Message
Madscientist
15
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 31st Dec 2010 18:10 Edited at: 31st Dec 2010 18:18
I know from experience how annoying it is to have to make out every keystate on your keyboard with scancode() just to get basic controls for your game. Well now you don't have to as for my own game I typed it all out into constants so instead of
if keystate(57)=1
you can say
if keystate(KB_Space)=1
I mapped out every key on the keyboard (standard keyboards). Feel free to inform me of typos. (I'm bound to have made one having to type out over 100 keys.)
Couldn't have done this without Grog Grueslayer's helpful chart
http://forum.thegamecreators.com/?m=forum_view&t=176826&b=1


My computer surpasses all the technologies of the day. What computer do I have?

Login to post a reply

Server time is: 2024-11-23 07:57:23
Your offset time is: 2024-11-23 07:57:23