Animations and audio

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jibjab910
Posts: 18
Joined: Fri Mar 02, 2018 7:46 pm

Animations and audio

Post by jibjab910 »

Is there a way to make an animation loop until an audio file is done playing using the sequence field?
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animations and audio

Post 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".
Post Reply