Saltar al contenido principal

corpse_action

An Action entry that fires at a specific point in a corpse's lifecycle. Use it to chain other actions (e.g., send a message, play a sound, grant a reward) when a corpse is spawned, looted, or expires.

Fields

FieldTypeDefaultDescription
eventCorpseEventTypeON_SPAWNWhen this action triggers: ON_SPAWN, ON_LOOT, or ON_EXPIRE.
criteriaList<Criteria>[]Conditions that must be met for the action to fire.
modifiersList<Modifier>[]Modifiers applied when the action fires.
triggersList<Ref<TriggerableEntry>>[]Sub-actions to execute when this action fires.

CorpseEventType

ValueDescription
ON_SPAWNFires when a corpse is spawned after a player dies. The player is the dead player.
ON_LOOTFires when a corpse is looted (right-clicked). The player is the looter.
ON_EXPIREFires when a corpse expires without being looted. No player context.

Usage Example

  1. Create a corpse_action with event = ON_LOOT.
  2. Add a trigger: send_message action with the message "You looted a corpse!".
  3. When any player right-clicks a corpse, they receive the message.

Notes

  • Multiple corpse_action entries can exist for the same event type — all will fire.
  • The ActionTrigger provides access to player and context in sub-actions.
  • This is a standard ActionEntry — fully compatible with the Tapwriter action chain system.