Page 1 of 1

Animations and audio

Posted: Fri Mar 23, 2018 1:55 am
by jibjab910
Is there a way to make an animation loop until an audio file is done playing using the sequence field?

Re: Animations and audio

Posted: Fri Mar 23, 2018 7:50 am
by Tony Li
Make sure your animation is set to loop. Then use a sequence like this:

Code: Select all

AudioWait(myAudioClip)->Message(Done);
AnimatorPlay(state1);
AnimatorPlay(state2)@Message(Done)
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".