Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Enter carries over to menu (pac-man type game)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
NE0




PostPosted: Sun May 28, 2006 4:35 pm   Post subject: Enter carries over to menu (pac-man type game)

"Hello, I finally registered here Wink
Ok, right now I have this game based on the Pac-man character. Pacman basically moves linearly across the screen and must avoid stars raining down. Speed can be controlled with 'a' and 's'.As well the walls close on Pacman.
Any way, when the game finishes it ask the use to continue or not. Orginally I planed that the user enters 'y' or'n' and presses enter, but the 'enter' keystroke carries over to the menu if you hold it too long. Right now I made it so the user entes only one key.
I'm trying to use 'enter' but need help avoiding the enter keystroke from selecting a menu choice.
Thanks, -NEO



pacman.rar
 Description:

Download
 Filename:  pacman.rar
 Filesize:  116.35 KB
 Downloaded:  58 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sun May 28, 2006 5:07 pm   Post subject: (No subject)

The easiest thing to do would be to stick a delay in there. Also try Input.Pause. Last resort, try using a boolean flag variable to only exit a loop once the enter key is released
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: