Hello again, just wanna ask how do you implement a game that you need to press button on a correct timing in which the visual and sound change on every correct input.
For example, player needs to reduce insanity so he needs to do the heartbeat game to reduce it. When event started, player need to press the correct input of button which have 3 stages. Visual and sound will be blurry and heartbeat sound is the fastest. As player click the correct button the visual and sound which were loud earlier became more clearer and no sound of heartbeat played anymore.
On first click start te timer and mark somewhere that it is active, and when timer pass make a miss code, on any other click check if timer past if not it’s OK reset timer if yes then nope (timer pass code should stop the check anyway). You can also use timer little diffrently like make longer time then target time and check timer status on click and make difference to target time, this way you can do some tollerance window if you want.
Remember that CPU don’t have sense of time and that timer code is executed in loop with other programs running by OS and it takes time for timers to be checked again, timers are checked on every frame (if im not mistaken) so if you have run 60FPS you got around 16ms accuracy