Origins: Powerful Powers
» Entity actions » Action on death

Action on death

origins-powerful-powers:action_on_deathpower type

Runs actions when the holder dies. Any living entity can hold it.

FieldTypeDefaultDescription
entity_actionEntity actionoptionalRuns on the holder.
bientity_actionBi-entity actionoptionalActor: the holder. Target: the killer. Skipped when there's no killer.
bientity_conditionBi-entity conditionoptionalIf set, both actions only run when it's true, and only when there's a killer.
damage_conditionDamage conditionoptionalIf set, both actions only run when the killing damage matches. The amount is the damage before armor.
  • It runs after the holder has died, so the actions see a dead entity. Use it for effects on the world, the killer or scores. To save the holder, use origins:prevent_death.
  • The killer is the entity credited by the damage source, such as the shooter of an arrow.

Example: "Last words". When you die to another player, they get Glowing for 30 seconds.

json
{
  "type": "origins-powerful-powers:action_on_death",
  "bientity_condition": {
    "type": "origins:target_condition",
    "condition": {
      "type": "origins:entity_type",
      "entity_type": "minecraft:player"
    }
  },
  "bientity_action": {
    "type": "origins:target_action",
    "action": {
      "type": "origins:apply_effect",
      "effect": {
        "effect": "minecraft:glowing",
        "duration": 600
      }
    }
  }
}