Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions.

Health🔗

Inherits: Area3D

This class defines a Health component for entities.

Propiedades🔗

HealthState

state

1

int

max_value

255

int

value

255

Shape3D

shape

CollisionShape3D

collider

<unknown>

Métodos🔗

void

_ready()

PackedStringArray

_get_configuration_warnings()

void

damage(amount: int, by_peer_id: int)

void

heal(amount: int = max_value)


Signals🔗

killed(by_peer_id: int) 🔗

Emitted when a peer damaged this component too much.


exhausted() 🔗

Emitted when value is exhausted.


changed(new_value: int) 🔗

Emitted when the value is changed.


damaged(source: Node, target: Node, amount: int) 🔗

Emitted when the health component is damaged.


Enumerations🔗

enum HealthState: 🔗

HealthState DEAD = 0

The entity is dead

HealthState ALIVE = 1

The entity is alive (value > 0)

HealthState DEGRADED = 2

The entity is wounded (value < 128)

HealthState CRITICAL = 3

Stop it, get help (value < 32)


Property Descriptions🔗

HealthState state = 1 🔗

There is currently no description for this property. Please help us by contributing one!


int max_value = 255 🔗

There is currently no description for this property. Please help us by contributing one!


int value = 255 🔗

  • void @value_setter(value: int)

There is currently no description for this property. Please help us by contributing one!


Shape3D shape 🔗

  • void @shape_setter(value: Shape3D)

There is currently no description for this property. Please help us by contributing one!


CollisionShape3D collider = <unknown> 🔗

There is currently no description for this property. Please help us by contributing one!


Method Descriptions🔗

void _ready() 🔗

There is currently no description for this method. Please help us by contributing one!


PackedStringArray _get_configuration_warnings() 🔗

There is currently no description for this method. Please help us by contributing one!


void damage(amount: int, by_peer_id: int) 🔗

There is currently no description for this method. Please help us by contributing one!


void heal(amount: int = max_value) 🔗

There is currently no description for this method. Please help us by contributing one!