Skip to main content

animation

Plays an animation on the entity.

Parameters

ParameterTypeDefaultDescription
namestringrequiredAnimation name from the model
modestringonceonce, loop, or hold
blendbooleantrueBlend from previous animation

Modes

  • once - Play once then stop
  • loop - Repeat continuously
  • hold - Play once and hold the last frame

Examples

Skills:
# Loop while idle
- animation{name=idle, mode=loop} ~idle

# Play once when hurt
- animation{name=hurt} ~onHurt

# Hold pose while sitting
- animation{name=sit, mode=hold} ~sitting

# No blending for instant switch
- animation{name=transform, blend=false} ~health{below=50, once=true}

Common Patterns

Basic Animation Set

Skills:
- animation{name=idle, mode=loop} ~idle
- animation{name=walk, mode=loop} ~moving
- animation{name=hurt} ~onHurt
- animation{name=death} ~onDeath

Speed-Based Animations

Skills:
- animation{name=run, mode=loop} ~moving{speed=0.3}
- animation{name=walk, mode=loop} ~moving
- animation{name=idle, mode=loop} ~idle

Phase Transitions

Skills:
- animation{name=enrage, blend=false} ~health{below=50, once=true}
- animation{name=transform} ~health{below=25, once=true}