I can Pause my game but how can I get it to unpause?

I came across the pause game node the other day. I’ve got it to where when I press “p” it pauses…but could someone talk me through having it to where if I press “p” again it will unpause?? thanks!!

1 Like

Hello,

In the Details panel of the input node used to pause the game, there is a checkbox which allows you to use that action while the game is paused to un-pause it (see below).

6875-paused.png

-W

9 Likes

Ah. So simple. Thank you. :slight_smile:

1 Like

ive…actually still had trouble with that…is there special way
i’m supposed to set it up that tells “p” to unpause ONLY after it’s been paused…I’ve set up a pause and an unpause but…nothing works.

It’s been a long while since this was posted, so hopefully you’ve found a solution to your issue. What I would do is make use of a boolean variable, I’ll call it isPaused, in BluePrint. Default it to false.
The first time P is pressed, check the variable to see its value. Since it is false, use a branch node and tell it to pause the game, and set isPaused to true. Set the input node, pressing P, to be able to be executed while paused. From the branch made earlier, make a line from true. Use that to unpause the game and set isPaused back to false.
I haven’t tested this yet, and as soon as I’m able I will try it out and post a screenshot of it in BluePrint, if it works.

Just tried it, and yeah, it works. I suppose you could play around with the return value from the Set game Paused node, but this works.

YES!! I was sooooo close. Lol but this fixed my issue. Tha m.you greatly.

Please use this next time

This was a huge help to me yesterday. I was doing the same thing as Morakaze and then saw the reply by Xukapy. Xukapy, would you walk us through the logic flow of your solution? It is working fantasticly but I am new to this and am having a hard time understanding why it works. Thank you in advance!

What is the purpose of using what Xukapy posted or a Boolean, when there is a Flip flop?? With what Xukapy posted, there is not 2 output pins (not 2 possible outcomes), thus when Paused, I cant do X, and when unpaused, I cant do Y.

And with Bool, I can have 2 outcomes. But isnt it easier and better to use a Flip flop for a toggle?

My only problem is I cant toggle a hud on and off.