Trying to get the game to pause/unpause with the same button messes with my controls

I managed to make it so that, in my game, you could pause and unpause with the same button, but when I exit out of the pause menu, the controls stop working entirely. Any idea on how to fix this? This is the blueprint code.

I’ve also noticed, it’s causing the mouse cursor to be able to leave the game window when I do it in another window.

UPDATE: Scratch that. The game won’t unpause AT ALL with the pause input. The issue is happening when I click resume.

UPDATE 2: Got the mouse issue fixed. Now I just need the unpause to work with the pause button.

image

How’s this?

Execute when paused is already checked.

UPDATE: It seems getting rid of the “SET input mode UI only” and “SET input mode game only” fixes the problem but then I’d have to click twice to be able to use the buttons in the menu.

Instead of going with ‘game only’ or ‘ui only’ why not use ‘game only’ and ‘game and ui’?

1 Like

It worked! Thank you so much!

1 Like