Game Over Screen
To start, I first created a widget. I then brought it to viewport. As a game over screen, I wanted there to be options as to what the player could do, being to restart the level or give up. Because of this, I made it so that the mouse cursor could interact with this menu, setting show mouse cursor to true.
To be able to test this out, I made it so this screen would display when I pressed K.
I then created a new Widget Blueprint. I first put a blur background at the very back, which I put the strength of 25 to, and added three buttons, with binds to each of them.
When retrying, I returned the player to the level.
When the player makes the option of going to the Main Menu, I returned them to there by opening the Main Menu level.
And when the player wanted to quit, I simply made them quit game.
To then ensure this would happen when I selected game over, I then created this within my DeplateHealth function, so that when the Player’s health reaches Zero, the game over screen is called.
Commentaires