Animations and audio
Animations and audio
Is there a way to make an animation loop until an audio file is done playing using the sequence field?
Re: Animations and audio
Make sure your animation is set to loop. Then use a sequence like this:
This sequence will play "myAudioClip". When it's done, it will send the sequencer message "Done". ("Done" is an arbitrary string.)
When the sequence starts, it will tell the speaker to play animator state "state1".
When the sequencer message "Done" is sent (by AudioWait), it will play animator state "state2".
Code: Select all
AudioWait(myAudioClip)->Message(Done);
AnimatorPlay(state1);
AnimatorPlay(state2)@Message(Done)
When the sequence starts, it will tell the speaker to play animator state "state1".
When the sequencer message "Done" is sent (by AudioWait), it will play animator state "state2".