Quantcast
Channel: GameSalad 101 — GameSalad Forums
Viewing all articles
Browse latest Browse all 8928

countdown timer press button (perfect, good, bad) DDR style

$
0
0

so once again im back with one of my fabulous questions... i have a mini game that im creating that has buttons that you have to press before a timer goes out... the timer is going to be for each specific icon... for instance i have a left right a and b button... its going to be ddr style but instead of the arrows hitting something and having to press the direct button the icons will spawn around the scene... NOW TO THE QUESTION...

i have no idea how to do this but this is what im thinking...

first i want each icon to have its own timer within a random number... for instance it would look something like this... change attribute self.timer to random (0.5,1.5)

next i have to determine if they pressed the button fast enough!

so for simplistic reasons lets say the random number ends up being 1...

if its perfect the you would have hit the corresponding button between 1 and .5 (saying that the counter is going down)

BAM thats a perfect score

however if its between .4 and .1 (meaning the lower half of the number) then it would give you a good

BUT HERES THE KICKER....
if its not pressed at all then its a bad score and you lose a life!

how do i do this you guys please help me out... thanks so much!


Viewing all articles
Browse latest Browse all 8928

Trending Articles