Skip to main content

Death State Constants

Numeric states to determine the state or stage of death with examples for Wasabi Ambulance Job V2 (wasabi_ambulance_v2).

The death system uses numeric states:

ConstantValueDescription
ALIVE0 | nilPlayer is alive and healthy.
LAST_STAND1Player is downed and crawling (can still be revived without full death).
DEAD2Player is fully dead (death screen active).

These values are stored in the wasabi:deathState player state bags and can be read from any script.

*This statebag can be changed in config/shared/config.lua.

Example — Checking death state from another resource:

-- Client-side
local deathState = LocalPlayer.state['wasabi:deathState'] or 0
if deathState == 0 then
print("Player is alive")
elseif deathState == 1 then
print("Player is in last stand")
elseif deathState == 2 then
print("Player is dead")
end
-- Server-side
local deathState = Player(source).state['wasabi:deathState'] or 0