CMCharacter Modules 0.1.0

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)
The Health component in the Inspector, with its defaults.
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

PropertyDescriptionRangeDefault
CharacterThe character this module belongs to. Drag its Character Motor here.None
Max HealthHealth when full, in health points.1 or more100
DamagedCalled with the damage taken, in health points.(no listeners)
DiedCalled once when health reaches zero.(no listeners)

Additional resources