PDA

View Full Version : reaction test mc



tommythewolfboy
March 18th, 2004, 09:52 AM
I wonder if anyone has any suggestions on the best way to create a reaction test guage - similar to the thing you get in golf games, etc. for example (e.g. PGA tour for any of you oldies like me/retro gamers). Essentially, there's a guage with a moving bar next to. The bar stops when you click the mouse - the aim to get the bar to stop on a certain point on the guage for a successful shot, otherwise you have a 'fail' (or an if statement for hook or slice depending upon which side of the guage you 'miss'. The bar gets faster the longer you leave it before pressing the mouse, making the task harder.
I'm thinking along these lines ...
accel variable for the bar mc that increments onEnterFrame. This is set to 0 when you press the mouse button. The _y of the bar mc then determines whether the success is a fail or success.
bar direction (up or down) also needs to be considered so the bar moves back and forward along the guage (mc._y plus or minus accel depending on which way it's travelling).

Anyone else done anything similar and can think of anything I've missed, etc? Thanks,

t

flash4food
March 18th, 2004, 04:34 PM
u can get the "grade" of the reaction by getting the distance(difference between x position or y position) of were u stopped the gauge and the target point of the gauge

ScottSonnenberg
March 21st, 2004, 06:56 PM
I am curious about making a game with a power meter also. Does somebody have a script or tutorial for this.

Thanx

tommythewolfboy
March 24th, 2004, 07:58 AM
I worked this out last night, so I'll post the details later.