Making A FNAF Win Condition

I’m trying to make a FNAF Game That is 20 seconds long. I joined a game jam that challenges people to make games that are only 20 seconds long.

Since it’s very short, I didn’t see a point in adding a camera system. Instead, what I did is add a little quiz to the game that requires that you are required to solve before closing the door within the 20-second mark.

I already figured out how to make the game jump-scare you if you don’t close the door in time. The only problem is that now I can’t get the game to change to my “Win Screen” when the door is closed and the 20 seconds are up.

Does anyone know how to fix this?

I think the issue is conflicting conditions.

For both scenarios, win and lose, you set that the timer has to be > 20.

It means that the same frame the timer is > 20, you expect the button to be clicked or not.

So, the player would need to click the button exactly the moment the timer begins to be > 20.

That’s a split second reaction, which the condition “button not clicked” will win 99.9% of the time.

You need to give the player the time to click it, for instance:

timer > 20 and button clicked = win

timer > 25 and button not clicked = lose

Or add some other conditions.