Too Many Attributes
» Entity actions » Action on kill

Action on kill

too-many-attributes:action_on_killpower type

Runs actions on the holder, the victim, or both, when the holder kills a living entity.

FieldTypeDefaultDescription
entity_actionEntity actionoptionalRuns on the holder.
target_actionEntity actionoptionalRuns on the victim.
bientity_actionBi-entity actionoptionalActor: the holder. Target: the victim.
bientity_conditionBi-entity conditionoptionalIf set, the actions only run when it's true. Actor: the holder. Target: the victim.
target_conditionEntity conditionoptionalIf set, the actions only run when the victim matches.
damage_conditionDamage conditionoptionalIf set, the actions only run when the killing damage matches. The amount is the damage before armor.
cooldownInteger1Ticks before it can run again.
hud_renderHUD renderhiddenShows the cooldown as a bar, like other Origins cooldown powers.
  • The killer is the entity credited by the damage source, such as the shooter of an arrow.
  • It runs after the victim has died, so target_action sees a dead entity. Use it for effects on the world around the victim.
  • To test the holder, use the power's own condition.
  • From Overgrown's Apoli: Overgrown's self_action and attacker_action are entity_action. Its attacker_condition is the power's own condition. entity_action_target isn't supported, so use target_action for the victim.

Example: "Soul harvest". Killing an undead mob heals you 2 hearts, at most once every 5 seconds.

json
{
  "type": "too-many-attributes:action_on_kill",
  "target_condition": {
    "type": "origins:entity_group",
    "group": "undead"
  },
  "entity_action": {
    "type": "origins:heal",
    "amount": 4
  },
  "cooldown": 100,
  "hud_render": {
    "should_render": true
  }
}