Hello! I didn't know how to formulate my question better.
I'm doing a one-button rhythm game; you have to press the 'Space' keyboard key on the correct beats. For example, a music is playing, and you have to press Space at specific beats, like the 4th, the 13th, the 20th, and so on.
Currently I know when the beat to tap is there and when it's not; and it's stocked in a boolean 'beatToTap'.
When this boolean is true, and Space is pressed, you got the beat. My issue comes when the boolean is true but you didn't tap the Space button. I fail to find a good way to detect the missed beat.
How can I detect that? I tried to invert 'key down' but it doesn't work, without much surprise, as I need the precision of on key pressed rather than just using a key down check.
I also tried the following, which works, but I'm afraid it's not the best way to do it:
> On Space Pressed: (btnTap=false) {btnTap = true}
> if (btnTap=true){Wait 0.1 sec; btnTap=false}
Thanks a lot for your help, I hope I made my problem clear!