> ## 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 do I add a dialogue (text) to my game?

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

### Adding text in the middle of the screen

<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 “Effects ” section, select the 'Text on HUD’ block, and add the text you want to appear on the screen. For example, you might select 'Text on HUD Hint’ to provide players with essential instructions, guidance, or narrative after some action is triggered in your game.

    <Accordion title="Behavior Image">
      |                          Behavior Block                          |                       How it looks in-game                       |
      | :--------------------------------------------------------------: | :--------------------------------------------------------------: |
      | <img width="300" noZoom src="https://i.imgur.com/bxDie2j.png" /> | <img width="600" noZoom src="https://i.imgur.com/XNiRoI8.png" /> |
    </Accordion>
  </Step>

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

### Adding text above an object in the map

<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 the game starting. Select a “Trigger” box and drag it into the editor.
  </Step>

  <Step title="Third Step">
    Navigate to the “Effects ” section, select the 'Text on Object’ block, and add the text you want to appear on the object. Don't forget to tap on the Object field and then select your desired object on the map.

    <Accordion title="Behavior Image">
      |                          Behavior Block                          |                       How it looks in-game                       |
      | :--------------------------------------------------------------: | :--------------------------------------------------------------: |
      | <img width="400" noZoom src="https://i.imgur.com/DxiJVj0.png" /> | <img width="500" noZoom src="https://i.imgur.com/bgxAxx7.png" /> |
    </Accordion>
  </Step>

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