How to set up simple checkpoints and respawns

I did the tutorial for checkpoints and re-spawns and it was way more complicated than I needed, so I wanted to post an easier way to set it up in blueprint.

Im using the marble game as an example.

Create a new blueprint of actor actor and name it as your checkpoint. Assign a mesh to it by dragging one into the add component on the left, make sure you give it a collision mesh.
Then under Components (Upper right corner of the blueprint) click on the [ROOT] under class, and in the collision presets drop down select overlapAll, this means it acts as a trigger box so when you run into it you don’t just bounce off.

Click on Defaults (Upper Right again) and at the bottom there is section called Tags, click on the + to add a new one and call it Checkpoint

Click on the Graph now (Upper right corner of the blueprint), then the event graph tab and set it up like this.

This means when the actor with the tag Player overlaps it, then it destroys itself. We will set up the Player next.

Now in your player character Blueprint and open up the Defaults and set its Tag to Player.

Now open up the Graph and set up two variables.
The first is PLayerPawn and its variable type is pawn.
Second is CheckpointTransform and is a transform variable type

Now fill out the first section with nodes.

Spawn checkpoint checks if it overlaps the object with the tag “Checkpoint” and saves the location as a transform variable checkpointTransform

Now set up the next section to re-spawn the player

When the player is Destroyed it spawns the player pawn and then gives control back to the player. Without the Possess part the AI would have control and not the player

So now if you run into a checkpoint it should respawn you at the location when you die. But, if you die before you hit a checkpoint you will respawn at 0,0,0 so lets fix that by setting you spawn to your start location.

Go the graph again of your player blueprint and click on the construction script tab and fill it out like so

All this does is set the checkpoint to the initial spawn location.

I found this to be way simpler for what I needed and works well. I hope it helps

1 Like

I answered my own question!

Thanks for this. 1000 blessings should come your way, and if not, 999 should do.

This works partially for me…but I am not respawning at the location of my checkpoint…instead I just respawn wherever I start the game from…? How do I set the variable of the players location when it enters the checkpoint so upon death he will start from the location of the checkpoint?

My player just keeps restarting from the player start…!

This is the way I figure it should work…When the pawn overlaps you cast to pawn and then get pawnslocation and store that vector. When you want them to respawn you then can use that stored vector for their location.

My question is how do I implement this using the method from above? I am missing a step somewhere…can anybody help?

does this method reset objects in the level as well?

Respawn Physics Ball?

This tutorial didn’t work for me because the node “CAST TO PAWN” and “SET PLAYER PAWN” (from the variable we’ve created) are not compatible. The error shown is “Pawn reference is not compatible with default pawn reference”.
How can I fix that ? Thanks.

I have a solution for checkpoints saved locally per level.

Hmmm. I don’t think this is entirely compatible with newer versions of Unreal. I am in 4.27.2 and am encountering errors. The most frustrating is that it tells me that the construction script can not be used in a blueprint graph. Frustrating as I am working in the marble game and really want my players to have a respawn point so they don’t have to always start from the very beginning.