I might do a tutorial on checkpoints. Here’s how I do it in a nutshell:
*NOTE: I don’t like Unreal’s “respawn” system. I prefer to have my own death control, where I don’t actually destroy the player actor, but rather “jails” it using bools like “CanMove”, “CanAttack”, “CanJump”, ect. I then control its visibility, and create a function for resetting everything when I move the player back into the “respawn” location.
I am going to use the default respawn method here, and assume you are not restarting the level. This isn’t perfect, and I don’t do level streaming, so I don’t know what the results will be with level streaming. I am primarily a 2D game developer.*
- Make a blueprint actor called CheckPointObject, give it a box collision component.
- Make a variable on your CheckPointObject called CheckPointOrder, it should be an INT, and public.
- Make a variable on your CheckPointObject called CheckPointFacing, it should be a rotator and public.
- On the begin overlap, first loop for all CheckPointObject(s), then get their variable CheckPointOrder.
- If CheckPointOrder is < the current CheckPointObject(s) (the overlapping one) CheckPointOrder, then delete that CheckPointObject.
- Now loop for (or have it set in your GameInstance/GameMode variable) your PlayerStart object, and move it to the CheckPointObject location.
- Set the PlayerStart rotation to the CheckPointFacing variable.
In this way, you will get a linear checkpoint system, without much of the hassle. This is one of many ways to do it, and it saves allot of headache.
Again, this assumes the level doesn’t restart, and if you are using streaming maps, make sure you checkpoint immediately before anything else happens after the new level streams in.