Skip to main content

Execute_PlayAnimalAnim

Description

Plays the S1 AnimalAnim animation on the BaseObject animal in place: the entry of that row for the animal's Animal row. It loops for F1 seconds, or plays once when F1 is 0, then the animal goes back to its idle poses.

Note

Does nothing if BaseObject is not an animal or the AnimalAnim row has no animation for it. It stops early when the animal starts walking or rides an object, or when StopAnimalAnim runs. The animation is shown on the game thread only; it is not saved and does not stop simulation movement. Put StopAnimalAnim in the cancel scripts so the animal does not keep playing when the interaction is canceled.

Parameters

ParameterDescription
BaseObjectThe animal that plays the animation (usually Target).
S1AnimalAnim Id of the animation to play.
F1Seconds to loop the animation. 0 plays it once.

Examples

DescriptionBaseObjectCommandS1F1
The target cat eats a treat for 12 secondsTargetPlayAnimalAnimCat_EatTreat12