play_animation

Plays a ModelEngine or BetterModel animation on the triggering entity, or the victim if it has none.

Categories: entity, visual

Required arguments

Key(s)DescriptionType
animationThe name of the animation to play.STRING

Optional arguments

Key(s)DescriptionTypeDefault
loopIf the animation should loop until it is stopped, whatever loop mode the model gives it.BOOLEANfalse
modePLAY_ONCE, LOOP or HOLD_ON_LAST. Defaults to the model's own mode, or LOOP if loop is true.STRING
durationTicks to play the animation for before stopping it. Leave out to let it finish, or loop forever.EXPRESSION
speedThe playback speed, where 1 is normal speed.EXPRESSION1
lerp_inTicks to blend into the animation.EXPRESSION0
lerp_outTicks to blend out of the animation when it stops.EXPRESSION0
startThe same as lerp_in, kept for older BetterModel configs.INT
endThe same as lerp_out, kept for older BetterModel configs.INT
forceIf the animation should restart when it is already playing.BOOLEANfalse
overrideThe same as force, kept for older BetterModel configs.BOOLEAN
selfIf the animation should only be shown to the triggering player. BetterModel only.BOOLEANfalse
modelOnly play the animation on the model with this ID. Leave out to play it on every model.STRING

Example

effects:
  - id: play_animation
    args:
      animation: <value>
      loop: true # ← Optional
      mode: <value> # ← Optional
      duration: <expression> # ← Optional
      speed: <expression> # ← Optional
      lerp_in: <expression> # ← Optional
      lerp_out: <expression> # ← Optional
      start: 1 # ← Optional
      end: 1 # ← Optional
      force: true # ← Optional
      override: true # ← Optional
      self: true # ← Optional
      model: <value> # ← Optional

Behaviour

SettingValue
Run orderNORMAL
Supports delaytrue
Reloads on plugin reloadtrue
Permanentfalse