Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

useHealth

useHealth(entity): { current: number; maximum: number; } | undefined

An entity’s health, read from the world, or undefined while it has no Health behaviour: the caller picks whether that hides a bar or reads full.

Parameter Type
entity Entity | null

{ current: number; maximum: number; } | undefined