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
| Parameter | Description |
|---|---|
| BaseObject | Character that is about to die |
| S1 | LifeTrigger.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
| Description | BaseObject | Command | S1 |
|---|---|---|---|
| Reuse the drowning cause before the death action | Self | SetDeathReason | FallIntoWater |
| Clear a stale cause left by an earlier trigger | Self | SetDeathReason | None |