playanim

From Arx Libertatis Wiki
Jump to navigation Jump to search

The playanim script command is used to play an animation for an entity.

⚠️
Save files store the byte offset of the command that is to be run when the animation finishes and the same byte position will be used even if the script is changed. Mods need to take care never to change the position of any animation -e commands if they want to stay compatible with old save files.

Usage

playanim [-123lnpe] <animslot> [e?command...]
playanim [-123p] none

Context: Any Entity

Flags:

 -1: Set the animation for the first animation layer - this is the default
 -2: Set the animation for the second animation layer
 -3: Set the animation for the third animation layer
 -l: Loop the animation
 -n: Do not interpolate from the current animation
 -p: Set an animation on the player instead of the calling entity
 -e: Execute a command after the animation completes

Parameters:

ParameterTypeDescription
animslot string The animation slot to kill
command (requires -e) command A command to execute after the animation completes

ℹ️  The delayed command specified using the -e flag is added as a hidden which can be cancelled using timer kill_local if playanim was called from the entity instance script. If the animation is cancelled the command will still be executed at the time the animation would have finished.

Animation slots

The animation for each slot is set using loadanim.

The following animation slots are supported:

  • wait
  • wait2
  • walk
  • walk1
  • walk2
  • walk3
  • walk_backward
  • walk_ministep
  • wait_short
  • walk_sneak
  • action
  • action1
  • action2
  • action3
  • action4
  • action5
  • action6
  • action7
  • action8
  • action9
  • action10
  • hit1
  • hit
  • hold_torch
  • hit_short
  • strike1
  • strike
  • shield_start
  • shield_cycle
  • shield_hit
  • shield_end
  • strafe_right
  • strafe_left
  • strafe_run_left
  • strafe_run_right
  • die
  • dagger_ready_part_1
  • dagger_ready_part_2
  • dagger_unready_part_1
  • dagger_unready_part_2
  • dagger_wait
  • dagger_strike_left_start
  • dagger_strike_left_cycle
  • dagger_strike_left
  • dagger_strike_right_start
  • dagger_strike_right_cycle
  • dagger_strike_right
  • dagger_strike_top_start
  • dagger_strike_top_cycle
  • dagger_strike_top
  • dagger_strike_bottom_start
  • dagger_strike_bottom_cycle
  • dagger_strike_bottom
  • death_critical
  • run
  • run1
  • run2
  • run3
  • run_backward
  • talk_neutral
  • talk_angry
  • talk_happy
  • talk_neutral_head
  • talk_angry_head
  • talk_happy_head
  • bare_ready
  • bare_unready
  • bare_wait
  • bare_strike_left_start
  • bare_strike_left_cycle
  • bare_strike_left
  • bare_strike_right_start
  • bare_strike_right_cycle
  • bare_strike_right
  • bare_strike_top_start
  • bare_strike_top_cycle
  • bare_strike_top
  • bare_strike_bottom_start
  • bare_strike_bottom_cycle
  • bare_strike_bottom
  • 1h_ready_part_1
  • 1h_ready_part_2
  • 1h_unready_part_1
  • 1h_unready_part_2
  • 1h_wait
  • 1h_strike_left_start
  • 1h_strike_left_cycle
  • 1h_strike_left
  • 1h_strike_right_start
  • 1h_strike_right_cycle
  • 1h_strike_right
  • 1h_strike_top_start
  • 1h_strike_top_cycle
  • 1h_strike_top
  • 1h_strike_bottom_start
  • 1h_strike_bottom_cycle
  • 1h_strike_bottom
  • 2h_ready_part_1
  • 2h_ready_part_2
  • 2h_unready_part_1
  • 2h_unready_part_2
  • 2h_wait
  • 2h_strike_left_start
  • 2h_strike_left_cycle
  • 2h_strike_left
  • 2h_strike_right_start
  • 2h_strike_right_cycle
  • 2h_strike_right
  • 2h_strike_top_start
  • 2h_strike_top_cycle
  • 2h_strike_top
  • 2h_strike_bottom_start
  • 2h_strike_bottom_cycle
  • 2h_strike_bottom
  • missile_ready_part_1
  • missile_ready_part_2
  • missile_unready_part_1
  • missile_unready_part_2
  • missile_wait
  • missile_strike_part_1
  • missile_strike_part_2
  • missile_strike_cycle
  • missile_strike
  • meditation
  • cast_start
  • cast_cycle
  • cast
  • cast_end
  • crouch
  • crouch_walk
  • crouch_walk_backward
  • crouch_strafe_left
  • crouch_strafe_right
  • crouch_start
  • crouch_wait
  • crouch_end
  • lean_right
  • lean_left
  • levitate
  • jump
  • jump_anticipation
  • jump_up
  • jump_cycle
  • jump_end
  • jump_end_part2
  • fight_walk_forward
  • fight_walk_backward
  • fight_walk_ministep
  • fight_strafe_right
  • fight_strafe_left
  • fight_wait
  • grunt
  • u_turn_left
  • u_turn_right
  • u_turn_left_fight
  • u_turn_right_fight