When Health Reduces to Zero on Character
Fires at the exact moment a character's health reaches zero, the point where the character is defeated.
Introduction
When Health Reduces to Zero on Character is an event in the Character Health group of World Events. It fires at the exact moment the health of a character reaches zero - the point where the character is defeated. When it fires, the event hands two values to your script: the Source character that was defeated and the Source player who caused it. Like every event, it does nothing by itself. It waits for the right moment, then runs all the actions connected to it. This is the decisive event of the health family, fed by When Health Decreases on Character and contrasted with When Health Increases on Character . The moment it fires, the life cycle continues with When Character is Killed and then When Character Respawns , so chain them together for a complete defeat-and-revive loop. Health rules on the asset side live in the Character Logic guide. When Health Reduces to Zero event block in the Script Editor with Source character and Source player parameters Image The When Health Reduces to Zero on Character event in the Script Editor. caption
Parameters
Source character the character that was defeated Source player the player behind that character Parameter Description
How to Access
How to Access - Event When Health Reduces to Zero
How to Use
Select the character, press Propertie (the blue equalizer icon) in the bottom action menu, and scroll to the bottom of the properties panel. Press Add Component and pick the Character Health component; its block stacks below the existing properties with the When Health Reduces to Zero event inside it. Press the + button below the event to add a script, then press Edit on that script to open the script editor and build the actions that should run when the event fires. Press Play, reduce the character's health to zero, and check that the actions run.
Example
When health reduces to zero on a character: Character.Kill Auto Respawn True, wait 2 seconds, Character Health.Reset Health when-health-reduces-to-zero-on-character-example.png Kills the character with auto respawn, waits 2 seconds, then resets its health. caption
Common Uses
Start a respawn flow when the character is defeated Show a game-over screen Award points to whoever landed the final hit
Tip
Connect cleanup and respawn actions here so the defeat does not leave dangling state behind.