Pause / Un-Pause with same key not working
Hello Unreal community!
I'm having an issue that I've been racking my brain on for a bit now and I figured before I head to bed I'd ask for a new set of eyes. Basically the issue is the game pauses and the menu comes up as normal. Using the resume button works as well as the quit button. What I'm wanting to do is add the functionality of being able to unpause the game with the same key using the "FlipFlop" node.
I was almost 100% certain this would work but it's not working as intended. I know it's partially working because if I use the "Resume Game" button then hit pause again the cursor disappears as it should.
Can anyone possibly give me some input on why this might not be working as expected?
asked Oct 17 '17 at 02:48 AM in Blueprint Scripting
I know I'm late to the party and this may be an obvious suggestion, but did you try setting the 'execute when paused' option on the pause input node?
answered Feb 21 '18 at 12:59 AM
Try having a variable that changes between true and false when the player pauses/unpauses the game. For example, have a boolean variable that changes to true when the esc key is hit for the first time then will change to false when the player clicks the resume button AND/OR when the player hits esc the second time. Instead of having a flipflop, have a branch that checks the variable. If the player hits esc, have it check to see if it's true or false. If its true, execute the code to unpause the game, then change it to false. If it's false, execute the code to pause the game then change to true. Make sure that the variable changes to false when the resume button is clicked too.
Try that and let me know if you are still experiencing problems!
answered Oct 17 '17 at 08:38 PM
I think BP_Character doesn't receive input when you use Set Input Mode UI Only. Does the event on BP_Character even fire once the game is paused?
You probably need to grab the key input in your menu and close it and unpause from there.
answered Oct 18 '17 at 12:56 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here