Model Animations
Learn about the mechanics of model animation playback
Model Animation Trigger Mechanism
There are two main ways to trigger model animations:
- Directly invoking model animations using Kether scripts.
- Using the interaction feedback mechanism between pet behaviors and model animations.
Triggering Animations with Kether Scripts
When playing model animations through Kether scripts, the animation is played forcefully.
Example of use:
pet select <pet_name>
pet animation <action>When using Kether scripts to play model animations, you must ensure that the corresponding model animation is defined in the pet's configuration.
Kether scripts cannot play animations that are not defined in the configuration.
For example:
pet:
model:
state:
- id: attack
lerpin: 0
lerpout: 1
speed: 1.0
- id: lookowner
time: 3In the configuration above, a valid Kether call would be:
pet animation attackHowever, the following call would be invalid because the model.state does not include an abab action:
pet animation ababInteraction Feedback
Model animations can also be triggered automatically through the pet's behaviors. This approach relies on the interaction between behavior actions and model states as configured.
pet:
action:
- id: attack
priority: 11
- id: walk
priority: 10
- id: lookowner
priority: 9
model:
state:
- id: attack
lerpin: 0
lerpout: 1
speed: 1.0
- id: lookowner
time: 3From the configuration above, you can see that the pet's behavior actions (pet.action) include: attack, walk, and lookowner.
Meanwhile, the model states (model.state) define animations for attack and lookowner.
Based on this configuration, when the pet performs different actions, the following effects occur:
- When performing the
attackaction: The model plays theattackanimation, as it is defined inmodel.state. - When performing the
walkaction: No model animation is played becausewalkis not defined inmodel.state. - When performing the
lookowneraction: The model plays thelookowneranimation, as defined in the configuration.
This interaction mechanism allows pets to automatically display corresponding animations when performing specific behaviors, enhancing interactivity and visual appeal.