# Health

{% hint style="success" %}
**COPY/PASTE PARAMETERS**

New in GM 0.11! Right click on a behaviour or component to copy. Then open an object, add the same behaviour or component, and right click it to paste identical parameter settings.
{% endhint %}

{% hint style="info" %}
**GAME MAKER 0.9 MULTIPLAYER ENHANCEMENT**

The Health component is now available in multiplayer games. Combat is still in development.\
**In multiplayer:**

* **Avatar health** is affected through the Health message, Power Up component, fall damage (relative to distance fallen), lack of oxygen, and block damage. The Avatar's health component is found under [**Spawn Point**](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/spawn-point-and-avatars-feature) behaviour (via **Avatar's Feature**).
* **Object health** (characters, props, etc.) is affected through messages and block damage. This page details an object's Health component.
  {% endhint %}

<figure><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/fSFChupKHvtpJSu6xit5/Health.gif" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
[build-singleplayer-and-multiplayer-logic](https://docs.sandbox.game/en/creator/game-maker/docs/build-singleplayer-and-multiplayer-logic "mention") - about <mark style="color:green;">**\[SP]**</mark> or <mark style="color:yellow;">**\[MP]**</mark> behaviours or components
{% endhint %}

## ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FCL2QncHKRFIMjyA8fxKT%2Fimage.png?alt=media\&token=923fa309-5700-4f87-bb68-ae76de4fb5b9) Health <mark style="color:green;">\[SP]</mark> <mark style="color:yellow;">\[MP]</mark>

Gives an asset a life system to:

* Receive damage and healing
* Set instant death message
* Send a message when health is 0
* Respawn to [**Checkpoint**](https://docs.sandbox.game/en/creator/game-maker/docs/components/status/avatar-checkpoint) after death
* Display a Life Bar to visualise an object's health
* Set blocks to decrease or increase object health

## Common Uses

* Give an asset health so it can be killed by the Avatar.
* Display Health Bar on assets
* Kill assets as a logic tool to send precise timed messages.
* Deprecated: Used to loop/cycle logic endlessly or by message. Instead, use [**Timed Events**](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/basic-logic/timed-events) behaviour or [**Game Rules**](https://docs.sandbox.game/en/creator/game-maker/docs/game-rules) system to create loops/cycles.

## Communications

<table data-header-hidden><thead><tr><th width="322"></th><th></th></tr></thead><tbody><tr><td><p><strong>Inputs:</strong> </p><ul><li>Message to trigger death</li><li>Heal/Damage messages</li></ul></td><td><p><strong>Outputs:</strong> Send message on death</p><p></p></td></tr></tbody></table>

## Parameters

| Options                                                                                         | Details                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/W1ebeRWI20kghs6fAuUy/1.png)  | **Health** (slider) - Adjust the Max Health of the object.                                                                                                                                                                                                                                                                                                                                                               |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/uSZQmtwWCJKGwj6ENIcG/2.png)  | <p><strong>Death Event</strong> - Define what happens to the object when it's destroyed.<br><br><strong>Destroy</strong> - The object will be destroyed.<br><strong>Reset</strong> - When object dies it will reappear/reset.<br><strong>Respawn To Tag</strong> - When object dies it will reappear at the location of the defined tag.<br><strong>Game Over</strong> - Defeat screen will appear when object dies.</p> |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/YyJhETPjxAEWAhmY6pfh/3.png)  | **Death Delay** - Set timer ( in seconds) before the object's death triggers.                                                                                                                                                                                                                                                                                                                                            |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/GRieTs8FCkU5XZ0ufOKI/4.png)  | **Instant death message** - The message that will kill the object.                                                                                                                                                                                                                                                                                                                                                       |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/q3bungwxe4Dgwk9X0JL6/5.png)  | <p><strong>Life Bar Display</strong> - Define when the life bar of the object is shown.<br><br><strong>Always</strong> - The health bar is always seen.<br><strong>On Hit</strong> - Only show health bar when damaged.<br><strong>Hidden</strong> - Never see the health bar.</p>                                                                                                                                       |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/cEdXaC0PgqtXf6HqbD2l/6.png)  | **Invincible** - Toggle True to make the object unkillable.                                                                                                                                                                                                                                                                                                                                                              |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/aIO0sfx5tORa2Us8W9vs/7.png)  | **Message sent on death** - Set which message gets sent when object dies.                                                                                                                                                                                                                                                                                                                                                |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/VKp5qLkoHNJgKwXxdAG5/8.png)  | **Send To Tags** - Which tag does the message on death gets sent to. (this is required)                                                                                                                                                                                                                                                                                                                                  |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/OP2TPi8KmQMVyqRadG06/9.png)  | **Damaging Blocks** - Add blocks that will damage the object when it collides with it.                                                                                                                                                                                                                                                                                                                                   |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/HP60dEUkCHywLZPU6izf/10.png) | **Blocks damage** - Define the amount of damage that will happen on collision.                                                                                                                                                                                                                                                                                                                                           |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/xZP0rft9oNw2nFBFkLS5/11.png) | **Healing Blocks** - Add blocks that will heal the object when it collides with it.                                                                                                                                                                                                                                                                                                                                      |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/cY3VwucaUcR1R9NPEFg2/12.png) | **Blocks heal** - Define the amount of healing that will happen on collision.                                                                                                                                                                                                                                                                                                                                            |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/7trG5NpjrQFUsQdvHetD/13.png) | **Stunnable** - Define if the object can get stunned during battle.                                                                                                                                                                                                                                                                                                                                                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sandbox.game/en/creator/game-maker/docs/components/status/health.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
