🔟Health

Give an asset health with settings to kill or respawn the asset.

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 Player settings.

  • Object health (characters, props, etc.) is affected through messages and block damage. This page details an object's Health component.

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 after death

  • Display a Life Bar to visualise an object's health

  • Set blocks to decrease or increase object health

PERFORMANCE TIP In multiplayer Experiences, there are two layers of logic that will not communicate with each other: singleplayer [SP] and multiplayer [MP]. For best performance, only apply [MP] behaviours and components to objects that MUST be synchronised to all players (or communicate on that layer), and maximise use of the [SP] (Client Only) layer.

USAGE TIP This component will not communicate with Quests or [SP] behaviours or components. It can be used in singleplayer Experiences.

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 behaviour or Game Rules system to create loops/cycles.

Communications

Inputs:

  • Message to trigger death

  • Heal/Damage messages

Outputs: Send message on death

Parameters

OptionsDetails

Health (slider) - Adjust the Max Health of the object.

Death Event - Define what happens to the object when it's destroyed. Destroy - The object will be destroyed. Reset - When object dies it will reappear/reset. Respawn To Tag - When object dies it will reappear at the location of the defined tag. Game Over - Defeat screen will appear when object dies.

Death Delay - Set timer ( in seconds) before the object's death triggers.

Instant death message - The message that will kill the object.

Life Bar Display - Define when the life bar of the object is shown. Always - The health bar is always seen. On Hit - Only show health bar when damaged. Hidden - Never see the health bar.

Invincible - Toggle True to make the object unkillable.

Message sent on death - Set which message gets sent when object dies.

Send To Tags - Which tag does the message on death gets sent to. (this is required)

Damaging Blocks - Add blocks that will damage the object when it collides with it.

Blocks damage - Define the amount of damage that will happen on collision.

Healing Blocks - Add blocks that will heal the object when it collides with it.

Blocks heal - Define the amount of healing that will happen on collision.

Stunnable - Define if the object can get stunned during battle.

Last updated

Logo

Copyright © 2012- 2023 The Sandbox. All Rights Reserved.