> ## 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.

# Adding or deducting Health

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

### How to add or deduct health from a player?

<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">
    To start, navigate to the “Game Actions” section. Here, select the “Set Maximum Health” node and set the maximum health players will have in your game.
  </Step>

  <Step title="Fourth Step">
    To adjust player health, start by adding a new Trigger. Then, in the "Game Actions" section, choose the "Increment Health" block. For instance, use 'Increment Health' to challenge players to manage their [health](https://wiki.soba.xyz/behavior-editor/game-logic/health#how-to-add-or-deduct-health-from-a-player) for survival and success. You can even input a negative value, like "-100", to reduce health. Other useful blocks include Kill Player, Increment Lives, Set Health, Set Maximum Lives, and Set Lives, allowing for diverse health mechanics customization in your game.

    <Accordion title="Behavior Image">
      <p align="center">
        <img width="500" noZoom src="https://i.imgur.com/8DqvFsd.png" />
      </p>
    </Accordion>
  </Step>

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