Page 1 of 1

Any way to automatically include a brief pause between sentences?

Posted: Fri Feb 11, 2022 3:44 pm
by Tentakero
Hello!

https://www.pixelcrushers.com/phpbb/vie ... php?t=2818

I saw this thread mentioning that "\." can be used in the middle of a dialogue block, but is there anywhere that I can tweak to make it so that all sentences do this by default? I'm worried that I'll miss this bit of code when implementing large blocks of text and I'll have to backtrack too much to correct it.

Re: Any way to automatically include a brief pause between sentences?

Posted: Fri Feb 11, 2022 5:16 pm
by Tony Li
Hi,

If you want to pause on periods and commas, you can configure the typewriter effect to do that. Add '.' to Full Pause Characters and ',' to Quarter Pause Characters.

If you want to pause on line breaks, you can add a script with an OnConversationLine method to your Dialogue Manager to preprocess the text:

Code: Select all

using PixelCrushers.DialogueSystem;
...
void OnConversationLine(Subtitle subtitle)
{
    subtitle.formattedText.text = subtitle.formattedText.text.Replace("\n", "\\.\n");
}

Re: Any way to automatically include a brief pause between sentences?

Posted: Fri Feb 11, 2022 5:38 pm
by Tentakero
Awesome, this is exactly what I was looking for. Thank you!

Re: Any way to automatically include a brief pause between sentences?

Posted: Fri Feb 11, 2022 9:25 pm
by Tony Li
Glad to help!