> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.soba.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# How to set a checkpoint

> Here is a step-by-step tutorial to add checkpoints to your game

### How to set a respawn checkpoint to your game?

Game checkpoints are key to prevent the need to repeat large portions of the map, or to provide a sense of accomplishment as players progress through the game! Follow the steps below to add a checkpoint to your game:

<Steps>
  <Step title="First Step">
    <Accordion title="The basics for all behaviors">
      1. Tap on the object to which you want to add a [behavior](https://wiki.soba.xyz/behavior-editor/managing-behaviors/behavior-object)
      2. With the object selected, tap on the “Details” button to the left of your screen.

      <p align="center">
        <img width="200" noZoom src="https://i.imgur.com/jMSZzP8.png" />
      </p>

      3. In the Details panel, tap “Add Behavior”.
    </Accordion>
  </Step>

  <Step title="Second Step">
    Decide what will trigger the behavior. This could be an action like a collision, an interaction, or players entering a game. Select a “Trigger” box and drag it into the editor.
  </Step>

  <Step title="Third Step">
    Navigate to the “Game Actions” section, select the 'Set Checkpoint’ block, and set the coordinates for the checkpoint. Alternatively, you can build a custom logic with further data by clicking on the position number and, instead of typing something, selecting ‘add custom graphs’. To select an object as a [coordinate](https://wiki.soba.xyz/behavior-editor/logic-on-objects/object-coordinates), add an “Object Offset Position” operator (as the image below). You can increment directions (hence why the name “Offset!”, as you can adjust coordinates from that initial point) on that offset, for example slightly change the Y coordinate of that operator, so that the checkpoint is set above the object and not inside of it!

    <Accordion title="Behavior Image">
      |                          Behavior Block                          |                       Nodes (custom graph)                       |
      | :--------------------------------------------------------------: | :--------------------------------------------------------------: |
      | <img width="300" noZoom src="https://i.imgur.com/3tuVzrf.png" /> | <img width="600" noZoom src="https://i.imgur.com/xneBD3O.png" /> |
    </Accordion>
  </Step>

  <Step title="Fourth Step">
    Exit the Behavior Editor, playtest and ensure it works as expected!
  </Step>
</Steps>
