Riley - V0.0.3 Devlog - Respawning & Checkpoints


Now that we have finally established the core mechanics of our game it is time to begin building the gameplay loop. We want our player to be able to respawn in the level. We want the majority of the level to be the same as it was before our player died so we don't want to reset the entire level, just our player. When our player dies we mark the Actor for destruction and tell the current GameMode to respawn the player.


The respawning code inside the GameMode class can be seen below. We simply spawn a new actor with our player's blueprint class. We then possess this pawn with our PlayerController. We also make sure to spawn it at our last checkpoint location using the players saved position and rotation. The checkpoints are a simple trigger that is placed throughout the level where it updates these two variables when the player collides with it.


This simple system produces the following loop for our gameplay as seen below.

Get Echo in the Shadows