Character Health
Gives a character its life attributes: Health Bar, damage resistance, and the death and respawn cycle.
Introduction
Character Health gives a character its life attributes: a Health Bar, resistance against weapon hits and collisions, and the death and respawn cycle. Without it, an NPC just exists — with it, it can be fought, defeated, and come back. You find it in the Add Component menu on a character under the Gameplay category, together with Character Follower, Character Patrol, and Conversation. For objects that are not characters, the plain Health component plays the same role. The Character Health component panel on a character in the Uni editor Image The Character Health component panel in the character's Properties Panel. caption
How to Access
Select the NPC, open the Properties Panel, press Add Component, and pick Character Health under the Gameplay category. How to Access - Add Component on a character
Properties
Max Health Int The most hit points the character can hold. Current Health The hit points the character has right now. Respawn Float How long until the character comes back after being defeated. Displayed Enum When the health bar shows: only after taking a hit, never, or always. Cooldown A brief invincibility window after each hit, before the next one can land. Multiplier Scales incoming damage up or down by this factor. Show Damage Bool Displays floating damage numbers when hit. Destroy Effect Effect The visual effect that plays when the character is defeated.
Events
When Health Decreases on Character Fires whenever the character loses health. Value, Source character, Source player When Health Increases on Character Fires whenever the character gains health. When Health Reduces to Zero on Character Fires when the hit points run dry and the character is defeated. None
Commands
Reset Health Refills the health back to maximum. None
Example
An enemy guard NPC that can be defeated, falls, and respawns back at its post. Character Health - simple example