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

Username:   Password: 
 RegisterRegister   
 Help needed with Dance Dance Revolution arrows.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Emmie




PostPosted: 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. Very Happy If you do have any info for me, please post it here or e-mail me at emmiedoll@hotmail.com. Thanks again!
Sponsor
Sponsor
Sponsor
sponsor
chrisbrown




PostPosted: Wed May 02, 2007 9:18 pm   Post subject: RE:Help needed with Dance Dance Revolution arrows.

I assume what you have is either
Turing:
get input
or
Turing:
input := getchar

What you need to do is
Turing:
if hasch then
input := getchar
end if

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




PostPosted: 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




PostPosted: Thu May 03, 2007 8:57 pm   Post subject: Re: Help needed with Dance Dance Revolution arrows.

Thanks for the help you guys! Very Happy They both sound like good alternatives. I'll try those out.
chrisbrown




PostPosted: 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.
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  [ 5 Posts ]
Jump to:   


Style:  
Search: