Pausing and continuing game not working

Hello guys, I got a little problem here. I want to pause my game by pressing the ESC key and then continue the game by pressing the same key again. Somehow it doesn’t work. Do you know a solution to this problem? That’s my code in the level blueprint:

By the way, pausing the game by pressing ESC key actually works fine, but if I press ESC again (when game is already paused and widget is shown) it doesn’t continue and also doesn’t close the widget.

Look at your first branch. You will always get true with this., hence your game will never unpause

Try setup like this and make sure you tick execute when paused.

1 Like

that actually works, but connecting A and B to the same node is no solution for my problem because I not simply want to toggle between paused and unpaused but also showing a widget (pause menu) and removing a widget. And that’s not possible with your solution, unfortunately

There are many ways to do this really, just like everything in UE4. :slight_smile: Sorry I was a bit lazy and I found that on youtube quick time. Here is the one I use most of the time. You could use select or flip flop too, it’s all up to you.

is there also a way to do this with the same key? Like ESC?

okay, already fixed it, thanks!

That was EXACTLY the issue I was having. Thank you very much from the future over 3 years later. Not something I even thought of but know I am aware.

1 Like