How can I create a pause menu for my game?

I would like to create a Pause Menu for my game. This menu would allow the player to select from typical options like Map, Magic, and Items.

What is the correct way to approach this in Unreal Engine 4?

I would love a detailed answer - even a high level overview would be nice.

Hey Demonicated,

We have an example of what you’re looking for already made! If you download the Content Examples from the Launcher > Marketplace, there is a map within named Blueprint_HUD that has all the assets needed for a basic HUD. We do not have our documentation for this Content Example available just yet, so if you have any specific questions about that example feel free to post those questions here on AnswerHub.

Thanks!

-Steve

Hi, is there any documentation on the C++ implementation of a HUD yet?

I have seen the example but it leaves everything to be inferred. Some guidance would greatly help.

It takes a handful of blueprints all working in coordination. Knowing which to create and in what order would be helpful. Even if just a high level outline would be helpful, then I would know where in the documentation to dig.

When I am trying to implement the HUD interface function ‘Toggle Menu’, there is no event in the list? If I have defined it in the BP_Interface_Events, why isnt it an option from the context menu in my BP_HUD?

In your BP_HUD blueprint, you need to select Blueprint Props and under Interfaces add your BP_Interface_Events interface and compile. You should be able to access it then.

Working on getting you a better overall response for your general HUD setup, hope to have that to you shortly.

The high level outline would be that your map needs a GameMode blueprint (see here) which will allow you to specify blueprints that will likely control your HUD–PlayerController Class and HUD Class.

Your PlayerController Class would ideally be where you want to handle any keyboard inputs for your map/game/HUD. For example, in Blueprint_HUD map, the BP_PlayerController_HUD blueprint is where we have our Input M to open the menu.

Your HUD Class is where all the magic happens with drawing your HUD. Event Receive Draw HUD is a Tick event, meaning it will fire off every frame of your game to draw your HUD given the instructions you connect to it. In the Blueprint_HUD map, our BP_HUD_Example has a branch early on that is toggled based on if the Menu should be drawn or not. If not, the main gameplay HUD is drawn, if yes, the Menu HUD is drawn (and gameplay HUD is not).

The HUD Class also contains the events for when you click the Hitboxes that are drawn by the Receive Draw HUD event.

Hopefully this enough to keep you going on working with Blueprint HUD. We’re working hard to get more official documentation for both Blueprint HUD and C++ HUD and hope to be able to provide it soon!

Yeah you have been really helpful! I got it up and running. I was able to re-create the example from scratch. So Im off on the right foot and would be glad to post up what I did so others can learn.

Last question: The example has the interface for toggle menu, but it’s not a true toggle. What has to be done so that hitting the Pause button will switch the game state back and forth?

Check out this HUD explanation (using the Content Examples) : http://youtu.be/7gwgU0UPENA and http://www.youtube.com/watch?v=s423ydn3t_E

The ShooterGame example from the Marketplace uses a Slate type of in-game main menu. Although it is very complex, it’s a place to start.

Thanks a lot bro’!

Hey Steve, I’m having problems to make my character using the FPS template to summon the menu. I can’t get the Get HUD node in my blueprint. Any input?

Hey ,

You need to drag off the Get Player Controller node’s Return Value to be able to find Get HUD:

Hope that helps!

-Steve

Yeah, I realized that later, I did this config some days ago, but now I can’t use the show mouse cursor and the enable event clicks as booleans to set (haven’t tried creating those as variables tho’) still not working, thanks for the quick response!

EDIT: Found a turnaround, rather than asking my character blueprint, I just created a new character controller with the code.

Unreal Motion Graphic is 1.000.000.000 times better than blueprint HUD…checks my video!

What’s the point of showing your video if you don’t teach and only show what you did. Oh good for you! Good! Do you care to write a tutorial about it?

Where can i find this Blueprint_HUD ? It is obviously not in my Marketplace …