Portrait Animation does not Stop when Using/Skipping Typewriter Effect

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Portrait Animation does not Stop when Using/Skipping Typewriter Effect

Post by michaelheiml »

Hi Tony,

another question:

1. In my speechbubbles (using Standard UI Subtitle panel) I use portrait animations, they work (Portrait Image linked + "Use Animated Portraits" checked).
2. Also, I use Text Mesh Pro Typewriter Effect on the Subtitle text to let the text be written along with the spoken text.
3. DSFU System Controller has set "Continue Button: Optional"

The behaviour is: a speechbubble pops up, the text is typewriter-style written and spoken and the animations are played (basically a face with mouth animations).

2 things can happen now:
1. (ok) If I do nothing and let the typewriter write / speak the text to the end, the animation (mouth) stops with the written words.
2. (problem) If I click mouse button / tap screen, the typewriter effect is skipped (text is finished immediately), the spoken text continues to be spoken until the sentence end, BUT the portrait animation keeps playing forever/mouth never stops to talk.

How can I stop the portrait animation in the second case?

Thanks, Michael
User avatar
Tony Li
Posts: 22152
Joined: Thu Jul 18, 2013 1:27 pm

Re: Portrait Animation does not Stop when Using/Skipping Typewriter Effect

Post by Tony Li »

Hi,

If the audio is being played with the Audio() sequencer command, try using AudioWait() instead. When the player clicks the continue button to progress the conversation early, AudioWait() will stop playing the audio. Audio() will not.

If you're using a sequencer command to play the closed mouth idle animation when the text has finished typing, use the 'required' keyword. This will guarantee that the command gets played even if the player clicks the continue button before the text has finished.

Example:

Code: Select all

AudioWait(entrytag);
AnimatorPlay(MouthMoving);
required AnimatorPlay(MouthClosed)@Message(Typed)
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Re: Portrait Animation does not Stop when Using/Skipping Typewriter Effect

Post by michaelheiml »

Hi Toni & thanks!
User avatar
Tony Li
Posts: 22152
Joined: Thu Jul 18, 2013 1:27 pm

Re: Portrait Animation does not Stop when Using/Skipping Typewriter Effect

Post by Tony Li »

Glad to help!
Post Reply