x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How do I setup a Pause and Un-Pause system using Blueprint?

I have been able to setup a pause system where you press the escape key and the game pauses but the issue I am having is un-pausing the game.

In the details for the escape button I have it enabled to be used when the game is paused I just don't know how to setup blueprint so when escape is pressed again it un-pauses the game. Anyone know?

Product Version: Not Selected
Tags:
more ▼

asked Jun 13 '14 at 10:38 PM in Blueprint Scripting

avatar image

Raiden58237
97 14 21 27

avatar image zeroexception STAFF Jun 13 '14 at 10:41 PM

The console command to pause is a toggle, maybe you need to call the same command as well to unpause. What are you using to pause it right now?

avatar image Raiden58237 Jun 13 '14 at 11:16 PM

At the moment all I have is this in the blueprint which pauses the game. alt text

pause.png (47.7 kB)
avatar image zeroexception STAFF Jun 14 '14 at 12:27 AM

You need to use the same "Set Game Paused" node but with the "Paused" input on the left unchecked. You would probably need to feed in a value there that is the opposite of the current "Is Game Paused" state.

avatar image Raiden58237 Jun 14 '14 at 11:29 AM

The thing is I'm new to UE4 Blueprint so at the moment I have near enough no idea as to what I am actually doing in it. I have followed some basic tutorials online but I am a long way off from doing stuff on my own. It's the reason I resorted to coming to this forum.

Do you know how I would feed a value opposite to "Is Game Paused" state?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Raiden58237,

I provided an example of how I got my game to pause and unpause. When you make your two booleans, at the bottom left screen you can check or uncheck the "default value" which makes the variable true or false. For your pause button make sure to check "execute when paused"

Let me know if it works

alt text

pause.png (186.5 kB)
more ▼

answered Jun 14 '14 at 11:45 AM

avatar image

Isaac Nichols
373 24 23 30

avatar image Raiden58237 Jun 14 '14 at 12:04 PM

Oh my god. That is so simple. Thank you for showing your example. Appreciate it alot!

avatar image Isaac Nichols Jun 14 '14 at 12:09 PM

Your welcome

avatar image GrandGame Mar 13 '19 at 04:10 AM

Thank you! Awesome!!! <3

avatar image ChrFrauzig May 04 '15 at 05:04 PM

Thanks Isaac Nichols

Whenever I pause the game it only renders what was is view when the game is paused, whilst everything else is hidden/culled, so when I look around I see nothing whilst the game is paused.

This is good for development purposes as I can check the culling, but I need to be able to pause the game while still looking around and seeing everything. Is that possible or should I look for a different tool?

I'm developing an Oculus Rift rollercoaster using a camera that is attached to a dummy that moves along a 3DsMax spline.

avatar image JHarshbarger May 26 '15 at 01:45 PM

I am also looking for a way to resolve this issue of pausing the game while using the Oculus Rift. It makes for a very bizarre and even nauseating effect in the pause screen that I cannot keep in the game as-is.

avatar image michaelwbell May 02 '17 at 09:55 AM

Sorry to revive a very old question. I have tried searching to an answer to this for no avail. JHarshbarger or ChrFrauzig - did you manage to solve the problem where the game will not render correctly when paused and the HMD is then moved/rotated?

avatar image GShbeeb Feb 06 '19 at 10:03 AM

Sorry for the revive on a dead thread, but someone may find it later.

As an answer to the pause and look around bit, use Set Time Dilation and put it to zero. Movement will be disabled effectively, but looking will still be fully functional.

avatar image r.piskorz May 03 '17 at 10:27 AM

michaelwbell when the game is paused you are not really meant to look around and interact with it much outside of a pause menu hence the entire game being paused. If you look at games in general, when you pause you can't carry on interacting with it. The pause system is meant if you actually need to stop playing for a certain amount of time or to change settings, save, load, all that kinda stuff. When you pause the game state it pauses all the rendering and all that. There isn't really a way around it unless you are willing to setup some kind of custom pause state in C++ which will pause the game but continue rendering objects onto the screen.

I use the Oculus Rift at work with the Touch and when the game is paused we actually advise the user to take off the headset as you're not meant to keep interacting with the environment.

One work around is before you pause it, everything gets rendered. Only problem is you will get a massive performance hit and I doubt you could maintain the 90FPS required to use the headset.

avatar image TheSlider Apr 29 '19 at 10:15 PM

alt text

Just to clarify the solution provided above. Since you're using a flip flop, you can use the provided "is A" boolean to set the pause state directly.

capture.png (27.8 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question