Help needed with Dance Dance Revolution arrows.
Author |
Message |
Emmie

|
Posted: Wed May 02, 2007 3:41 pm Post subject: Help needed with Dance Dance Revolution arrows. |
|
|
Hey there. I'm new to CompSci, so hello to everyone. I'm trying to make a pretty basic DDR program. I'm just looking to get the basics down, nothing fancy at the moment.
I'm having a few issues with:
- The arrows. I can get the arrows moving by themselves but I'm having trouble getting an input from the user to work so that they can get points when they hit the right key. What I have right now stops the program, waits for an input, then shows the motion of the arrow and repeats. I'm trying to make it so that the arrows continue to move and the user can hit a key at any time without stopping the movement. Any suggestions?
- A button on the screen the player is playing on that stops the song and allows the user to choose a new song. If I put in a buttonwait, the button works but then I have to click everytime I want the arrows to keep moving. Without the bttonwait the button doesn't work.
Thanks so much. Any suggestions or tips would be greatly appreciated. If you do have any info for me, please post it here or e-mail me at emmiedoll@hotmail.com. Thanks again! |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
chrisbrown

|
Posted: Wed May 02, 2007 9:18 pm Post subject: RE:Help needed with Dance Dance Revolution arrows. |
|
|
I assume what you have is either
or
What you need to do is
hasch will return true if the user presses a key, so when that is true, getchar will read the pressed character and store it in the input variable (whatever name you used)
when no keys are pressed, the getchar part is skipped, so your program will continue without waiting for user input |
|
|
|
|
 |
Clayton

|
Posted: Thu May 03, 2007 8:08 am Post subject: RE:Help needed with Dance Dance Revolution arrows. |
|
|
The easier (and probably better) alternative is to use Input.KeyDown() to search for input instead. Check out the Turing Walkthrough for the tutorial on Input.KeyDown |
|
|
|
|
 |
Emmie

|
Posted: Thu May 03, 2007 8:57 pm Post subject: Re: Help needed with Dance Dance Revolution arrows. |
|
|
Thanks for the help you guys! They both sound like good alternatives. I'll try those out. |
|
|
|
|
 |
chrisbrown

|
Posted: Thu May 03, 2007 9:18 pm Post subject: RE:Help needed with Dance Dance Revolution arrows. |
|
|
I don't know what I was thinking...definitely go with Input.KeyDown. I had my mind on another program at the time. |
|
|
|
|
 |
|
|