Respawning the Player (Single Player)
Below you will find the steps needed to respawn the player in a single player game when they are killed.
The steps below are based off using the Blueprint Third Person Template project, however you can use any project you wish.
Inside your project, open up your Game Mode Blueprint (we are using the ThirdPersonGameMode Blueprint).
Right-click in the graph and add an Event Begin Play node, then Right-click again and add a Get Player Character node.
Drag off the Return Value of the Get Player Character node and add a Cast To ThirdPersonCharacter node and connect the nodes.
You want to Cast To your Player Character Blueprint, which is ThirdPersonCharacter in this example. This will allow us to access it and determine when the player character is killed by using an On Destroyed event, at which point we can spawn a new player character.
Drag off the As ThirdPersonCharacter C pin and add an Assign On Destroyed node.
Off the newly added OnDestroyed_Event node, add a Delay node set to whatever time you wish to delay the respawn (optional).
Here we are Binding an Event to another Event from another Blueprint. This allows the Event in this Blueprint to fire off when the Event occurs from the other Blueprint (the OnDestroy Event from ThirdPersonCharacter). This is called an Event Dispatcher and can also be used to communicate with the Level Blueprint to tell the world an Event has occurred.
Off the Delay node (if you added it), add a SpawnActorFromClass node and set the Class drop down to ThirdPersonCharacter.
Create a new Transform variable and call it Spawn Transform, then connect it to the Spawn Transform of the Spawn Actor node.
Right-click in the graph and add a Possess node.
You may need to uncheck Context Sensitive for the node to appear in the menu.
Connect the Return Value from the Spawn Actor to the In Pawn of the Possess node and connect the execution wires.
Drag off the Target pin of the Possess node and add a Get Player Controller node.
Near the Event Begin Play node, Right-click in the graph and add a Custom Event and name it Respawn.
You may need to re-check Context Sensitive for the node to appear in the menu.
Connect the custom event to the Cast To ThirdPersonCharacter node.
Drag off the Possess node and call the Respawn event, your full graph should look similar to below.
Click image for full view.
Compile and Save then close the Blueprint.
Open the ThirdPersonCharacter Blueprint, Right-click in the graph and add an Event Begin Play node.
Right-click again and add a Get Game Mode node, then drag off it and Cast To MyGame (or your Game Mode).
Drag off the As My Game C pin and add the Set Spawn Transform node.
Right-click in the graph and add a Get Actor Transform node then connect it to the Set Spawn Transform node.
This is getting the location of the player when they start the game and setting it as the respawn location.
Right-click in the graph and add an F Key Event and connect a Destroy Actor node off the Pressed pin.
This is for testing purposes and will kill (Destroy the Actor) when the F key is pressed. You would more than likely call the Destroy Actor node when the player loses enough Health or some other event that would typically kill your player.
If you Compile and play in the editor, whenever you press the F key, you should disappear momentarily, then respawn at the starting location.