Triggering animations with the Play Animation action
Using the Play Animation action you can start any animation clip with all triggers that come with Kanzi.
To trigger an animation with the Play Animation action:
- Create an animation clip and the object you want to animate with that animation clip.
- Create an object from which you want to trigger the animation and add a trigger to it. See Adding a trigger.
For example, create a button and use the Button: Click trigger.
- In the Properties click the drop-down menu, and select the Play Animation action.
The Message Editor opens.

- In the Message Editor > General tab set:
- Target Item property to the object you want to animate.
- Animation property to the animation clip that animates your object.

- In the Message Editor > Advanced tab set the animation playback settings:
- Playback Mode property defines how the animation in the animation clip is played:
- Normal plays the animation as it is defined in the animation clip.
- Ping pong first plays the animation as it is defined in the animation clip and then plays the animation in reverse.
- Reverse plays the animation defined in the animation clip in reverse.
- Length Scale property defines the duration of the animation defined in the animation clip.
For example:- When set to 1, the animation is of the same length as it is defined in the animation clip.
- When set to 0,5, the animation is half as long as it is defined in the animation clip.
- When set to 2, the animation is twice as long as it is defined in the animation clip.
- Restore Original Values After Playback defines whether the values of the animated properties return to their initial values when the animation in the animation clip ends.
For example, if the initial value of a property you animate with an animation clip is 0 and at the end of the animation clip the value is 1, when you enable the Restore Original Values After Playback property, Kanzi returns the value of the animated property to 0 when the animation clip ends. - Action Delay (ms) sets the delay in milliseconds after which the animation starts playing.

See also
Animating an object for the duration of its lifetime
Changing the interpolation mode between keyframes
Creating animated UI controls
Editing animation clips
Editing timeline sequences
Animating movement
Animating property values
Animations
Open topic with navigation