Skip to main content

~onEnterCombat

Fires when the entity first enters combat (gets attacked or attacks something).

Parameters​

ParameterDefaultDescription
oncefalseOnly trigger once per entity lifetime

Context Variables​

  • @Attacker - The entity that initiated combat (if available)

Examples​

Skills:
- animation{name=combat_ready} ~onEnterCombat
- showbone{bone=weapon} ~onEnterCombat

Common Patterns​

Combat Stance​

Skills:
- animation{name=draw_weapon} ~onEnterCombat
- showbone{bone=sword} ~onEnterCombat

Boss Awakening​

Skills:
- animation{name=awaken} ~onEnterCombat{once=true}
- showbone{bone=glowing_eyes} ~onEnterCombat
- hidebone{bone=sleeping_particles} ~onEnterCombat

Alert Animation​

Skills:
- animation{name=alert} ~onEnterCombat

Enrage Effect​

Skills:
- animation{name=enrage} ~onEnterCombat
- showbone{bone=rage_aura} ~onEnterCombat

Notes​

  • Combat state is tracked internally using a 200-tick (10 second) window after last damage
  • This only fires on the transition from "not in combat" to "in combat"
  • Pairs well with ~onDropCombat for combat state management