Pause/unpause with the same key not working

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

How do I…

A clear and concise description of what you are trying to do.

What is the expected result

Explain what should happen when you run the game.

What is the actual result

Explain what is happening instead, what is going wrong.

Related screenshots

Please include a screenshot of the full related events including both conditions and actions.
And screenshots to help showing us the issue.

Project files (optional)

Insert a minimal game showing your issue in a .zip or .rar.


every time i try and pause the game the pause menu shows up for like half a second then restarts the level.

Because you spam switch it

You want to toggle boolean variable

ok im kinda dumb when it comes to coding so, sorry, but where?

So if you don’t understand what you see then do this

Create 3 events

In 1st event
Condition
Return key is pressed
TRIGGER ONCE

Action
Change variable SOME BOOLEAN VARIABLE HERE toggle

2nd event
Condition
SOME BOOLEAN VARIABLE = TRUE
TRIGGER ONCE

Action
Here you pause

3rd event
Condition
SOME BOOLEAN VARIABLE = FALSE
TRIGGER ONCE

Action
Here you unpause

I’ll try it out! Thanks!

1 Like