Page 1 of 1

Question about Continue Mode, Sequence, and Typewriter

Posted: Mon Dec 09, 2024 5:14 am
by golden1yaki
Hi,

I'm implementing a function to allow players to toggle Continue Mode between "Always" and "Never." However, I've noticed an issue where some subtitles advance too quickly when Continue Mode is set to "Never," even if the typewriter has just started displaying a few words.

After looking up the forum, I found that this happens because a dialogue entry advances as soon as its sequence finishes. I hav some custom sequencer commands that aren't time-based and invoke a stop at the end of those methods. So dialogue entries with these sequencers get skipped(kind of) too quickly.

Is there a workaround to ensure dialogue entries only advance when the typewriter effect (or the line itself) is finished, regardless of the sequencer timing, when Continue Mode is set to "Never"?

Thanks!

Re: Question about Continue Mode, Sequence, and Typewriter

Posted: Mon Dec 09, 2024 8:08 am
by Tony Li
Hi,

Yes. Listen for the "Typed" sequencer message. The typewriter effect sends this message when it's done.

More info: How To: Control the Duration of Subtitle Text

Note: If you're using Text Animator, see the integration. You'll need to use TextAnimatorSubtitlePanel to get the Typed message from Text Animator.

Re: Question about Continue Mode, Sequence, and Typewriter

Posted: Tue Dec 10, 2024 12:44 am
by golden1yaki
Hi Tony,

Thanks for the reply!
Sorry I wasn't very clear about my question. Here is a sample walkthrough of my database.
sample.jpg
sample.jpg (293.13 KiB) Viewed 1150 times
Sequencers "DoSomething1", "DoSomething2", "DoSomething3" aren't time-based and should be called as soon as the subtitle shows.
In this sample, dialogue quickly advances to node 4 when Continue Button Mode is "Never", and node 4, 5 display normally.

I've tried using @Message(Typed) but sequencers execute at the end of subtitle, and it's not ideal for me.
I've also tried typewriter's OnEnd() method(from this post), like this:

Code: Select all

void OnEnd()
{
  typewriter.onEnd.RemoveListener(OnEnd);
  dialogueUI.OnContinue();
}
typewriter.onEnd.AddListener(OnEnd);
It works as expected, but not with when Continue Button Mode set to "Never."
This raises a new question: If I prefer to use the typewriter's OnEnd event, what’s the best way to control continue button to achieve an auto-play function?

Re: Question about Continue Mode, Sequence, and Typewriter

Posted: Tue Dec 10, 2024 7:09 am
by Tony Li
Hi,

I recommend setting entry 1's Sequence to:

Code: Select all

DoSomething1();
DoSomething2();
{{default}}
The {{default}} keyword will pull in the text of the Dialogue Manager GameObject's Display Settings > Camera & Cutscene Settings > Default Sequence.

Then leave the Default Sequence to its initial value: Delay({{end}})
or change it to wait for the typewriter: WaitForMessage(Typed)

Or, if you don't know ahead of time whether continue mode will be Always or Never, set the Default Sequence to: Continue()@{{end}} or Continue()@Message(Typed)

That should always work. If it's not working in your scene, possible culprits are:
  • Subtitle Text GameObject doesn't have a typewriter effect.
  • Or the typewriter effect's Play On Enable checkbox is ticked. This should be UNticked. The dialogue UI will take care of playing the typewriter effect instead.

Re: Question about Continue Mode, Sequence, and Typewriter

Posted: Wed Dec 11, 2024 10:04 pm
by golden1yaki
Hi Tony,

All solutions work!
I end up using {{default}} + WaitForMessage(Typed).
Continue()@Message(Typed) also works but I need to do some modifications, so WaitForMessage(Typed) is the easier way.

Thanks!

Re: Question about Continue Mode, Sequence, and Typewriter

Posted: Thu Dec 12, 2024 7:14 am
by Tony Li
Glad to help!