Skip to main content

~onKill

Fires when the entity kills another entity.

Parameters​

ParameterDefaultDescription
oncefalseOnly trigger once per entity lifetime
playeronlyfalseOnly trigger when killing players

Context Variables​

  • @Target - The entity that was killed

Examples​

Skills:
- animation{name=victory} ~onKill
- animation{name=consume} ~onKill{playeronly=true}

Common Patterns​

Victory Animation​

Skills:
- animation{name=roar} ~onKill

Player Kill Celebration​

Skills:
- animation{name=taunt} ~onKill{playeronly=true}
- showbone{bone=trophy} ~onKill{playeronly=true}

Consume Effect​

Skills:
- animation{name=eat} ~onKill
- hidebone{bone=hungry_indicator} ~onKill

Berserker Power-Up​

Skills:
- animation{name=power_up} ~onKill
- showbone{bone=blood_aura} ~onKill

Notes​

  • This triggers after the killing blow is dealt
  • Works with both melee attacks (doHurtTarget) and ranged attacks if they cause death