Computer Science Canada Anyone know how to make a classic button masher Olympic game |
Author: | born130 [ Mon May 12, 2003 9:28 pm ] |
Post subject: | Anyone know how to make a classic button masher Olympic game |
Hey just wondering if anyone knows how to make a button masher Olympic game similar to arcade style. For example: press "a" repeatedly to move character to finish line in 100m. or long jump, get the right angle and button mash. If anyone has code please post. Thanks |
Author: | Tony [ Mon May 12, 2003 9:37 pm ] | ||
Post subject: | |||
i suppose you can just run a loop with a getch in it...
*coughf2cough* - Darkness then when time is up (ether you finished y>=maxy or time is up (use a timer)) then you exit the loop |
Author: | Dan [ Mon May 12, 2003 9:37 pm ] | ||
Post subject: | |||
here is a really really really simplified version of what you want to do:
You can use getch to wait until a key is hit then after that move the object and add to the counter. although there may be a problem in that you could hold down a button. Indented -Darkness |
Author: | Dan [ Mon May 12, 2003 9:38 pm ] |
Post subject: | |
dang you bet me to it tony, oh well your ex is better |
Author: | Martin [ Tue May 13, 2003 11:34 am ] | ||
Post subject: | |||
If you want it to be a button masher, then you would have to do this.
|
Author: | born130 [ Tue May 13, 2003 8:46 pm ] |
Post subject: | |
Does anyone know how I could stop the clock when one of the racers has crossed the finish line? i.e. it will stop when one of the racers crosses the finish line at point y. Also how would i modify the controls by using two keys and moving through alternate pressings? Thanks |
Author: | Dan [ Tue May 13, 2003 8:57 pm ] | ||||
Post subject: | |||||
born130 wrote: Does anyone know how I could stop the clock when one of the racers has crossed the finish line?
i.e. it will stop when one of the racers crosses the finish line at point y. do you mean stop a timer you have going or stop the loop?
or
|
Author: | born130 [ Tue May 13, 2003 9:07 pm ] |
Post subject: | |
Actually what i meant was i wanted to stop the clock that is running to show the time that the racer finished in. i.e. if it took 9906 milliseconds to finish the race, the clock would stop and read that. |
Author: | Dan [ Wed May 14, 2003 3:41 pm ] | ||
Post subject: | |||
oic, this is what i whode do.
|