Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Pause Menu | User Interface and Sound Effects
Unreal Engine FPS Game
course content

Conteúdo do Curso

Unreal Engine FPS Game

Unreal Engine FPS Game

1. Unreal Engine Introduction
2. The Character Blueprint
3. Enemy Blueprints
4. Level Design and Aesthetics
5. User Interface and Sound Effects
6. Gameplay Logic
7. Packaging for Windows

bookPause Menu

In this chapter, we will create a simple pause menu, give it some functionalities, and using the BP_FirstPersonCharacter blueprint, we set up the instructions that will allow us to pause the game! The general process is similar to what we have done previously in that we make a new widget and add the desired functionalities to it. What is different here is that we add an event in the WBP_PauseMenu, and BP_FirstPersonCharacter that will pause or resume the game once the resume button or the P key is pressed.

Note

We are using the P button on the keyboard to pause the game because while we are in the Unreal Engine Editor, the Escape button will exit the game and therefore we need to have another key for pausing the game for now.

The general steps in creating a pause menu consist of creating a widget, placing some buttons in the canvas panel and programming the instructions for each button.

For the Resume button, you need to use Set Game Paused, as well as setting the Input mode of the PlayerController Game Mode Only and set Show Mouse Cursor to False.

At the end, use Remove From Parent node to remove the pause menu widget from the screen/viewport.

You will then need to go to your BP_FirstPersonCharacter, and look for the keyboard key that you want to use for pause in this case, we are using the P key. Select the event that is created, and make sure to check the Execute When Paused checkbox to be able to use P to unpause the game. It is also important to set the input mode to Game and UI when you are pausing the game, otherwise pressing P will not unpause the game. Follow the video for the step-by-step instructions.

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 5. Capítulo 3
some-alt