Skip to content

SetActorAnim

Puts a pose on a standing actor - a clip of the game’s animation set.

clip is a clip name of the male animation set (behavior_sitting_variation01_loop, greetings_wave_big_over, woodchopping_loop_01 …) or one of the aliases the API names: sit, wave, bow, nod, pray, chop, sweep, smith (ACTOR_ANIM in Constants). loop true (the default) plays it until cleared; false plays it once. nil clears the pose; so do MoveActor and a death. The pose rides in the actor’s state bag (key anim), so a player who arrives later finds the guard sitting. A chore without its prop mimes - a smith without an anvil.

SetActorAnim(id, clip [, loop])
Parameter Type
id number the actor
clip string | nil a clip name or an alias; nil clears the pose
loop boolean true (the default) loops; false plays once (optional)

boolean - false for anything but a living actor

StopActor(guard)
SetActorAnim(guard, "sit") -- an alias: loops
SetActorAnim(herald, "greetings_wave_big_over", false) -- a clip by name, once
SetActorAnim(guard, nil) -- stands up

MoveActor · StopActor · SetEntityState · the NPC actors group of the index