Computer Science Canada Enter carries over to menu (pac-man type game) |
Author: | NE0 [ Sun May 28, 2006 4:35 pm ] |
Post subject: | Enter carries over to menu (pac-man type game) |
"Hello, I finally registered here ![]() 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 |
Author: | Cervantes [ Sun May 28, 2006 5:07 pm ] |
Post 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 |