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.

2D All the way! / Problem with Key presses

Author
Message
Bankzy10
15
Years of Service
User Offline
Joined: 29th Jan 2009
Location: Planet DarkBasic - Learning the tricks
Posted: 31st May 2009 18:26
To navigate through my menu you use the up and down arrow keys and use the enter key to select an option. Anyway, when you select Start from my menu I have a section where you input your initials and you have to press enter again to accept the input - My only problem is that it loads the bit where you input your initials but it instantly goes off and straight onto my game. It's a problem with the key press. When you select start and press enter from the menu, it also takes that enter button as the next section - where you input your name. Can anyone help me. Is there a way of delaying the key presses?



Thanks in advance, Bankzy10!
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 31st May 2009 22:05 Edited at: 31st May 2009 22:34
The same way you use a REPEAT/UNTIL loop to check for RETURNKEY()=1 (being hit) you can check for zero as well (not being hit). You should also clear the entry buffer before getting the users initials.

Put this before the REPEAT/UNTIL loop for the user initials:


Bankzy10
15
Years of Service
User Offline
Joined: 29th Jan 2009
Location: Planet DarkBasic - Learning the tricks
Posted: 31st May 2009 23:15
Thanks mate, yet again you've been a great help!

Login to post a reply

Server time is: 2024-03-29 04:54:42
Your offset time is: 2024-03-29 04:54:42