[SOLVED] Help with timers

I’m trying to make a timer that would start exactly when the player is in collision with a hitbox, and when the timer reaches 2 seconds, it would change the scene. but when I play the game, it would change the scene regardless of the collision. I’ve tried 2 methods, one where it would start the timer exactly when the player touches the hitbox, and another where it would modify a variable and the game would test if the variable equals 1, and when it does, it would start the timer. But both methods ended up changing the scene regardless. am I doing something wrong??? here are the codes:

you have to reset and pause the timer, at the beginning of the scene.
Then unpause the timer on collusion.
if a condition ask for a timer, and that timer does not exist yet, it will create and start the timer automatically.

2 Likes

When the scene start, also the timer start. So manage it and begin of scene.I suggest also to add once on collision

welp this worked. Thanks so much!!