viverse logo

EntitySubscribeAnimationEnd

EntitySubscribeAnimationEnd - Create A Trigger Based On When An Animation Ends

This guide provides instructions for setting up the EntitySubscribeAnimationEnd trigger. In the sample app, when the avatar enters the blue trigger area, the character’s dancing animation begins to play. The dancing animation has an animation event added and the animation event is triggered whenever the animation stops playing.

1 2
The character’s dancing animation has started. When the character’s dancing animation ends, the animation event is triggered and text is displayed to show that the animation event was triggered.

1. In this example, an animation event is added to an animation. The character has an animation state graph added with 2 animations.

A. An animation state graph has been created and added to the character.

B. A dancing animation has been added to the animation state graph.

3

2. To add an animation event to animation, open up the animation.

A. Click the + Event button.

B. Because the EntitySubscribeAnimationEnd trigger is going to be used, an animation event called end is added. A value of 8 is added to the time field to trigger the event at the end of the animation. In the name field, end is added.

4

3. To add the EntitySubscribeAnimationEnd trigger functionality

A. Click the Select plugins text field and select TriggerAndAction in the dropdown menu.

B. Click "+" beside the Select a module and add dropdown.

C. Click "+" beside the selected module dropdown.

D. Click the type dropdown and select the EntitySubscribeAnimationEnd trigger.

E. Click "+" beside the selected module dropdown.

F. Click the type dropdown and select a desired action. In this example, the EntityEnableById action is selected. For the EntityEnableById action to work, an object needs to be added that will be enabled. In this example, the AnimationEndText object is added.

5

Previous

EntitySubscribeAnimationStart

Next

EntityRigidbodyAddForceInPhysics