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 / continue key

Author
Message
Zaine
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 28th Jun 2005 16:40
how do you write it to where you can hit like the space bar, andit will clear the screen and continue on with the story.. im trying to do it to a simple text game which can be found and downloaded at www.angelfire.com/ga4/games60/index.html
any help will be apreaceated..
Oliver
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Switzerland
Posted: 28th Jun 2005 23:49


Killonyas Slayer
19
Years of Service
User Offline
Joined: 13th Apr 2005
Location: Mozerok,Eartreg
Posted: 29th Jun 2005 02:54
For a specific key(where you don't want the game to move on unless you hit that key and nothing else[good for turorials of a game])

but the spacekey can be any key.

-"I'm over twice as strong as I was when we last met"-
-"Good, Twice the fall, double the glory"-
Zaine
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 29th Jun 2005 05:52
ok i tired the code ucame me time but when i hit enter, it closes.. i was wanting it to do something like this

is is possible to do that with DBPro?
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 29th Jun 2005 11:56 Edited at: 29th Jun 2005 12:00
Zaine,

If I may add, when a user presses a key with no restrictions on the command which is searching for the press, one keypress will turn into many per press, instead of one. To clarify, let's say that a user presses and holds the spacebar down for aproximately one second. Upon each runthrough of the code that the computer makes, which given a syncronization rate of 60 times/sec may be 60 times per second, the code that is within the IF statement for the keypress command, is executed. Therefore, creating unbearable uncontrolability, with the underlying code being executed at each syncronization point that the key is down.

There must be a way to control this, efficiently. Through many experimentations, I have come to what I believe is the most effiecient way to do this. The key is to switch a boolean variable to "true" the moment the key is pressed, and to not switch it back to "false" until the moment the key is let off of.




+NanoBrain+
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 29th Jun 2005 13:54
How about just using suspend for key and print text that says "Press Any Key To Continue".
Killonyas Slayer
19
Years of Service
User Offline
Joined: 13th Apr 2005
Location: Mozerok,Eartreg
Posted: 29th Jun 2005 14:04
I use Dbp, I use that stratagy that I told you a ton of times in my text rpg's.

-"I'm over twice as strong as I was when we last met"-
-"Good, Twice the fall, double the glory"-
Zaine
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 29th Jun 2005 18:04
i find that the
suspend for key
works the best.... thanks for everyones help...

Login to post a reply

Server time is: 2024-09-23 23:27:53
Your offset time is: 2024-09-23 23:27:53