Skip to main content

Execute_SetDeathReason

Description

Records the death cause phrase on the character so the obituary text message can print it. Death paths that go through a LifeTrigger snapshot the cause on their own, so this is for the death actions that never reach one and would otherwise send the obituary with an empty or stale cause.

Parameters

ParameterDescription
BaseObjectCharacter that is about to die
S1LifeTrigger.Id whose death cause phrase is reused. None clears the recorded cause

The phrase itself is not written here. Only the LifeTrigger.Id is recorded, and OnDeath resolves it to the entry matching the character's growth step at that moment. The cause therefore stays identical to the one a real LifeTrigger death would print and lives in one place in the data.

Examples

DescriptionBaseObjectCommandS1
Reuse the drowning cause before the death actionSelfSetDeathReasonFallIntoWater
Clear a stale cause left by an earlier triggerSelfSetDeathReasonNone