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 / [SOLVED] Is there a command for detecting no input?

Author
Message
Programmer2000
14
Years of Service
User Offline
Joined: 19th May 2010
Playing:
Posted: 27th Dec 2010 07:51
I was wondering if I could use a command to detect that no key is being pressed, and then use that command for an IF-THEN statement, as in:

IF (No key is pressed) THEN VELOCITY=0

Is there a command that does that? Or do I type zero in for the other key detection commands?

The author of this post has marked a post as an answer.

Go to answer

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Dec 2010 12:46 Edited at: 27th Dec 2010 12:47
This post has been marked by the post author as the answer.
You can check the SCANCODE() function, which returns 0 if no key is pressed:


Programmer2000
14
Years of Service
User Offline
Joined: 19th May 2010
Playing:
Posted: 27th Dec 2010 20:34
Yes, that works! Thanks!

I tested it with

Login to post a reply

Server time is: 2024-09-29 00:26:38
Your offset time is: 2024-09-29 00:26:38