Health
Kind: Module · Add Component: Character Modules > Gameplay > Health
Tracks health that damage lowers. At zero the character dies.
The character's health: damage lowers it, and at zero the character dies.
Inspector
▼Health
CharacterCharacter (Character Motor)
Max Health100
Damaged(no listeners)
Died(no listeners)
Origin. Every game since the arcade lives counter.
How it works
The character's health. Damage from fall damage, hazards, kill volumes and crushing lands here, and is reported as Damaged and Died events (for HUDs, audio, animation) and as UnityEvents (for quick wiring in the Inspector).
Combine it
- Used by the presets: Arena Shooter, Competitive Shooter, Surf, Retro Platformer, Modern Platformer, Traversal Adventure, Action RPG.
Properties
| Property | Description | Range | Default |
|---|---|---|---|
| Character | The character this module belongs to. Drag its Character Motor here. | None | |
| Max Health | Health when full, in health points. | 1 or more | 100 |
| Damaged | Called with the damage taken, in health points. | (no listeners) | |
| Died | Called once when health reaches zero. | (no listeners) |