Simple Pause Menu

Hey guys I am trying to build a pause system, press ENTER key (sound plays), game pauses - then hit ENTER again and the game resumes.

Here is what I have

Right now when you are in game and press ENTER, you hear the sound but the game doesn’t pause. Can anyone spot the problem?

Probably because your pause variable is set to false on image, try to set it to true so it should pause your game, but remember when you pause that, things are set to pause state.

OK on the Pause var I checked the box in the default value (I am guessing this is how you set it to true) and now when I am in game, and press Enter, the sound plays and the game pauses, perfect, except when I hit Enter to unpause, nothing happens and the game remains paused. Any suggestions? Thanks in advance!

It looks to me like you don’t have anything set up to actually happen when the game is unpaused. So sure, when you press enter a second time, it flip flops and sets your paused variable to false, but then what? There’s no code, from what I see, to actually remove the pause menu you’ve spawned.

I’m not over experienced with Unreal Engine 4, but that is my opinion.

Can you be a bit more specific please? Currently when I click ENTER the game pauses like it should, but now when you hit ENTER the game doesn’t unpause. Thank you in advance.

Select your “enter” input node, on details panel you will find an option called “execute when paused”, enable that and it will work.

1 Like

Get rid of your unpause thing and your other pause variable. Just plug the “is A” directly into the “set game paused” node

Also just a tidiness thing. Go into your game settings and configure the inputs and you can define a “Pause Button” and set it to be the enter key and the gamepad on the same thing.

This thread can be closed, problem solved! I checked the box inside the enter node “execute when paused” and also deleted the unpause var and dragged off the IS A, - all is working perfectly! Thank you so much everyone! In case anyone in the future is searching for a simple pause menu working here it is:

a628045bff8ab2b6428c4b70e9d183744304db26.jpeg