How to make the player respawn after pressing a button

When a player dies, I want to make it so that it shows a button saying respawn or something, and when they press it, they respawn. I don’t know how to make a button show, or how to make the player respawn.

1 Like

You can use a button in a dialogue to do this. First, make a script that simply creates a unit for the last player selecting a dialogue option and makes their camera track it:

Then, go in World > Dialogues and create a new dialogue. Add a dialogue option and set it to run the script you just created.

In the unit death script, add an ‘open dialogue for player’ action to show the respawn dialogue to owner of this entity. The script might look something like this:

1 Like