Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To respawn at the latest activated checkpoint in GDevelop, save the checkpoint’s X and Y coordinates in scene variables when the player touches it, then set the player’s position to those values when a death event occurs. Initialize the variables from the player’s starting position at the beginning of the scene so an early death does not send the player to (0, 0).

1. Create a checkpoint object

Create a Sprite object named Checkpoint, assign it an image, and place one or more instances in the scene. The image is only its visual representation; the event logic will use the object’s coordinates.

GDevelop’s official tutorial uses this event-based approach to send the player to the most recent checkpoint after death: GDevelop’s platformer tutorial.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Save the checkpoint position when touched

Add an event with a collision condition between Player and Checkpoint. In that event, add actions to change scene variables:

#1 Best Overall
Sale
Game Programming Patterns
  • Brand New in box. The product ships with all relevant accessories
  • Set scene variable CheckpointX to Checkpoint.X().
  • Set scene variable CheckpointY to Checkpoint.Y().

GDevelop’s ObjectName.X() and ObjectName.Y() expressions return the object’s coordinates. Each time the player touches a checkpoint, these actions replace the saved coordinates with that checkpoint’s position.

3. Set a safe starting position

Before the player reaches any checkpoint, the saved coordinates need a useful default. Otherwise, the tutorial notes, an early death can send the player to (0, 0).

Add an event with the At the beginning of the scene condition, then set the scene variables to the player’s initial position:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
  • Set CheckpointX to Player.X().
  • Set CheckpointY to Player.Y().

Now the player’s placed starting position acts as the first respawn point. The collision event can replace it after a checkpoint is activated.

4. Reposition the player when death occurs

Find the event that represents death in your game. In GDevelop’s tutorial example, death is triggered by collision with a Slime enemy. Remove the action that deletes the Player, then add an action that sets the player’s position:

  • Set the Player’s X position to Variable(CheckpointX).
  • Set the Player’s Y position to Variable(CheckpointY).

The death condition and the respawn action are separate parts of the system: your existing death event decides when to respawn, and the position actions send the player to the saved location.

5. Make falling off the level trigger the same respawn

The checkpoint tutorial documents enemy collision as its death example; it does not provide a fall-below-the-level condition. If falling out of bounds should count as death, add a boundary or other level-specific condition to detect that situation, then connect it to the same respawn-position actions.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the detection appropriate to your scene—for example, a player below the level’s playable area—and test it against your layout. The checkpoint coordinates alone do not detect a fall.

6. Account for platformer movement and landing position

For a platform game, GDevelop recommends using the Platformer character and Platform behaviors. The character behavior handles gravity and platform collisions; collision conditions are still useful for interactions such as touching an enemy or checkpoint. GDevelop’s platformer behavior documentation also covers state conditions such as Is on floor, Is jumping, and Is falling.

This example saves the Checkpoint object’s X and Y coordinates and places the Player at those same coordinates. It does not automatically align the player’s feet with a platform or center the player over the checkpoint. If the saved point produces an awkward landing, adjust the position in your event logic or design the checkpoint object’s origin and placement to suit the desired respawn location.

7. Choose an approach for multiple checkpoints

For a straightforward level, saving the most recently touched checkpoint’s coordinates is usually the simplest arrangement. If your game needs to identify or revisit specific checkpoint instances, a community forum example uses a unique object variable such as ID for each checkpoint and stores the activated checkpoint’s identifier in a scene variable. The death logic then checks that identifier to choose a checkpoint.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That ID method is a community pattern, not a guaranteed or official event-sheet recipe. Verify the events in your current GDevelop project before relying on it. Choose based on what your design needs:

  • Save coordinates directly: simpler when death only needs to return the player to the latest activated point.
  • Save a checkpoint ID: potentially useful when later logic needs to know which checkpoint instance was activated.

Whichever method you use, decide whether the respawn should match the checkpoint sprite’s origin or a deliberately offset landing position; the object’s coordinates do not by themselves guarantee a safe or feet-aligned spawn.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

8. Consider GDevelop’s Checkpoints behavior

GDevelop’s tutorial says its Checkpoints behavior can make this task easier. The cited tutorial does not include setup steps for that behavior, so the coordinate-based events above provide the documented, explicit method here.

Quick Recap

SaleBestseller No. 1
Game Programming Patterns
Game Programming Patterns
Brand New in box. The product ships with all relevant accessories
$24.95
SaleBestseller No. 2
Designing Games: A Guide to Engineering Experiences
Designing Games: A Guide to Engineering Experiences
Used Book in Good Condition
$34.99

Test the event flow

  • Start the scene and die before touching a checkpoint; the player should return to the starting position.
  • Touch a checkpoint, then trigger the death event; the player should return to the saved coordinates.
  • Activate a second checkpoint and repeat; the coordinate method should use the latest saved position.
  • If falling should cause death, test that boundary condition separately from enemy collisions.
  • Check that the resulting position leaves the player on a safe, playable part of the level.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.