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 / alternate arrow keys

Author
Message
Tim Ballisto
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Right behind you.
Posted: 7th Mar 2004 22:01
i was trying to make a two player game played on 1 keyboard, player 1 gets asdw as their arrow keys, and player 2 uses the regular ones.
my problem is that the computer doesn't want to accept two letter keys at the same time, like a+w should be jump and move left, but it just does whatever was pressed first.
that, and it won't accept a letter key and an arrow key at the same time, so if both players hold left, only the person who pressed the key first will move.
how do i fix this?
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Mar 2004 22:02
are you using KEYSTATE command?


"What the... Moooooooo!"
Tim Ballisto
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Right behind you.
Posted: 7th Mar 2004 22:05
no, i tried scancode and inkey$, does keystate work well?
Dmas_Zero
20
Years of Service
User Offline
Joined: 9th Feb 2004
Location:
Posted: 7th Mar 2004 22:11
yes keystate will work for you
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Mar 2004 22:12
keystate will work better than other methods - bear in mind that keyboard hardware has limitations on certain key combinations and total keys pressed at once. Look up KEYSTATE in the help and use this for the scancodes



"What the... Moooooooo!"

Login to post a reply

Server time is: 2024-09-22 00:23:13
Your offset time is: 2024-09-22 00:23:13