How to display "you died" and then display game menu?

Hey guys, I want to display “you died” and then display game menu after our health reaches zero, instead of re-spawning? Any suggestions?

Thanks in advance

We cover this in depth in the final course, Shops and Abilities.

1 Like

Oh, I only implemented the menus part of the course.

Apologies, this is tagged as RPG, but doesn’t (well, didn’t, I’m going to edit the tags) have the Shops and Abilities tag, which is usually how I know where you are in the course work.

You’ll note that we have a Pause menu within the game scene. You’ll just need to create a new menu UI that subscribes to the Player’s OnDeath event. It might have something like:

You Have Died
Restart Level
Return to Main Menu
Quit the Game

Then take the appropriate action for each choice… for Restart Level, just invoke SavingWrapper.LoadLastScene(), for Main Menu Load scene 0, and for Quit the game, Application.Quit.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.