Page 1 of 1
Slight Pause between characters
Posted: Tue Feb 01, 2022 11:09 pm
by PayasoPrince
Hello,
I'm trying to figure out how I can have the typewriter pause for a moment between characters during dialogue.
For example:
"Is that a..." (Pause for 2 seconds) " a GHOST??"
Is there a simple way to accomplish this?
Re: Slight Pause between characters
Posted: Wed Feb 02, 2022 8:44 am
by Tony Li
Hi,
Use
RPG Maker-style codes in your dialogue text:
"Is that a..." \.\. " a GHOST??"
Re: Slight Pause between characters
Posted: Wed Feb 02, 2022 11:25 am
by PayasoPrince
Very simple and easy to work with!
I am curious, I don't want the player to be able to fastforward or (Stop()) the typewriter effect during a pause. Is it possible to temporarily disable the fastforward button and then reenable it once the pause is over?
Re: Slight Pause between characters
Posted: Wed Feb 02, 2022 11:55 am
by Tony Li
If you're using UI Text, you can make a subclass of UnityUITypewriterEffect and override PauseForDuration:
Code: Select all
protected override IEnumerator PauseForDuration(float duration)
{
// Disable your fast forward button here.
yield return base.PauseForDuration(duration);
// Re-enable it here.
}
If you're using TextMeshProTypewriterEffect, you'll need to either wait for version 2.2.25 to do the same thing as above, or make a subclass and override the entire Play method.
Re: Slight Pause between characters
Posted: Wed Feb 02, 2022 12:20 pm
by PayasoPrince
Ah, alright. I'm using TextMeshPro. So, I guess I'll wait for version 2.2.25.
Glad to know that I can use it in the future!