Displaying the menu
Now that our menu has been created, we need to tell the game when to show it to the player. As we called our HUD objects from within the FirstPersonCharacter Blueprint, let's go ahead and call this menu from the same location. Open FirstPersonCharacter in the Blueprints folder.
We are going to need to trigger an Event that will signal the end of the game. Before we even determine what that signal will be, we can create a custom Event node to represent it. Add a custom Event node to some empty graph space and rename it End Game.
When the victory condition is met, we want to stop the player from continuing to move around the game world. To do so, attach a Set Game Paused node to our Event and check the Paused checkbox. Next, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access