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 / Multiple Key Input Question

Author
Message
Alexander
20
Years of Service
User Offline
Joined: 30th Jul 2004
Location:
Posted: 30th Jul 2004 11:55
Hey guys, I'm fairly new to DBPRO, so I ran into problems with inputs. I am developing a game, a motorcycle game like MotoGP, but not really, hoping to improve physics and controlls of the bike and the rider. I ran into trouble trying to get multiple key input, not the "key" function keys but the other set. For example i can not get my program to read "x" and "c" simoultaniously. Is there a way to do it?
Thanks in advance!

Swiss cheese has a lot of holes. More cheese there is, more holes there are. Therefore, more cheese you eat, less you have...
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 30th Jul 2004 12:01
use keystate()

for example:

if keystate(17)=1 then ...
would do something when 'w' was pressed

use scancode() to figure out which key is assigned to which number

do
set cursor 0,0
print scancode()

sync
loop

Login to post a reply

Server time is: 2024-09-22 18:39:25
Your offset time is: 2024-09-22 18:39:25