Hello, I've been syncing character talk animations up in the sequence controls, but I've noticed there are some situations where the dialogue doesn't sync to the animation. This is because my current setup uses the end of the sequence to swap the player's animation. If the continue mode is false, this causes the dialogue to finish printing, but the talk animation still plays. In addition, the talk animation will play if I use the /. sequencer to delay text. Is it possible to sync the animations through the sequencer so they only play when subtitle text is printing? I'm using the default TMPro Typewriter effects to handle printing.
Thanks!
Sync Animation to Subtitle printing instead of dialogue end
Re: Sync Animation to Subtitle printing instead of dialogue end
Hi,
Yes. The typewriter effect sends the sequencer message "Typed" when it's done. You can set the dialogue entry's Sequence (or the Dialogue Manager's Default Sequence) to something like:
AnimatorPlay(talk) will play as soon as the dialogue entry starts.
AnimatorPlay(idle) will play when the typewriter ends. The 'required' keyword guarantees that it plays even if the player skips ahead before the typewriter is done. Technically the typewriter will send "Typed" even if the player skips ahead, so this is just an extra safety measure.
Yes. The typewriter effect sends the sequencer message "Typed" when it's done. You can set the dialogue entry's Sequence (or the Dialogue Manager's Default Sequence) to something like:
Code: Select all
AnimatorPlay(talk);
required AnimatorPlay(idle)@Message(Typed)
AnimatorPlay(idle) will play when the typewriter ends. The 'required' keyword guarantees that it plays even if the player skips ahead before the typewriter is done. Technically the typewriter will send "Typed" even if the player skips ahead, so this is just an extra safety measure.
Re: Sync Animation to Subtitle printing instead of dialogue end
Thank you for the response!
This is half of what I'm looking for. Now, dialogue stops when it's done printing. However, I would also like for the talking animation to stop playing if a pause in dialogue (\.) occurs. Right now, I have a node that begins with a pause, and the talk animation plays during the pause, before the character's dialogue begins printing. Is it possible to truly sync animations up to dialogue in this way such that if a pause occurs, they return to their idle until text begins printing again without hardcoding this behavior into each sequence that uses a pause?
This is half of what I'm looking for. Now, dialogue stops when it's done printing. However, I would also like for the talking animation to stop playing if a pause in dialogue (\.) occurs. Right now, I have a node that begins with a pause, and the talk animation plays during the pause, before the character's dialogue begins printing. Is it possible to truly sync animations up to dialogue in this way such that if a pause occurs, they return to their idle until text begins printing again without hardcoding this behavior into each sequence that uses a pause?
Re: Sync Animation to Subtitle printing instead of dialogue end
Hi,
There's nothing built in to stop the talk animation during RPG Maker-style pause codes. With some scripting, you could make a subclass of TextMeshProTypewriterEffetct. Override the Play() coroutine. In the section of code that pauses, also handle animation:
Alternatively, if you're playing audio you could use SALSA or a lipsync asset to handle the talking animation. SALSA will move the character's mouth to approximate the sounds that are being played. If no sound is being played, the mouth will stay closed.
There's nothing built in to stop the talk animation during RPG Maker-style pause codes. With some scripting, you could make a subclass of TextMeshProTypewriterEffetct. Override the Play() coroutine. In the section of code that pauses, also handle animation:
Code: Select all
case RPGMakerTokenType.FullPause:
// << YOUR CODE HERE TO STOP TALK ANIMATION >>
yield return DialogueTime.WaitForSeconds(fullPauseDuration);
// << YOUR CODE HERE TO RESUME TALK ANIMATION >>
break;
Re: Sync Animation to Subtitle printing instead of dialogue end
Finally got the chance to test this out and it's working great for my purposes, thanks for the help!