[HOWTO] How To: Match Typewriter Speed & Subtitle Display Duration

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] How To: Match Typewriter Speed & Subtitle Display Duration

Post by Tony Li »

With default settings, you may notice that subtitles stay onscreen for a duration after the typewriter effect finishes.

Here's the quick answer to finish the subtitle as soon as the typewriter finishes: Inspect the Dialogue Manager GameObject, and set Display Settings > Subtitle Settings > Subtitle Chars Per Second to 50. Set Min Subtitle Seconds to 0.5.

Explanation: The duration of the typewriter effect is separate from the duration that the subtitle stays onscreen.

The typewriter effect's duration is based on its Characters Per Second and the length of the text. If the text is 150 characters and Characters Per Second is 50 (the default value), the typewriter will finish in 150 / 50 = 3 seconds.

The subtitle stays onscreen for the duration of its sequence. If the subtitle's dialogue entry node's Sequence is blank, it will use the Dialogue Manager's Camera & Cutscene Settings > Default Sequence. The Default Sequence's default value is Delay({{end}}), which delays for a duration based on the text length and Subtitle Settings > Subtitle Chars Per Second and Min Subtitle Seconds. If the text is 150 characters and Subtitle Chars Per Seconds is 30, the subtitle will stay onscreen for 150 / 30 = 5 seconds.

Additional Note: When the typewriter finishes it sends the sequencer message "Typed". Your sequences can listen for this message. For example, if you have a talking animation, you could use something like:

Code: Select all

AnimatorPlay(Talking); // Play the Talking animation on the speaker.
AnimatorPlay(Idle)@Message(Typed); // Play the Idle animation when finished typing.
For more info on how typewriters and subtitle durations are related, see: How To: Control the Duration of Subtitle Text
Post Reply