Dialogue does not wait for Custom Typewriter

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Alexis
Posts: 11
Joined: Fri Oct 16, 2020 11:34 am

Dialogue does not wait for Custom Typewriter

Post by Alexis »

I've created a custom typewriter that inherit from the Abstract typewriter. However, I'm having issues because the dialogue system only waits for the "MinSubtitleSeconds" value before skipping to the next bubble, no matter if typewriter has finished displaying. The Stop does is not sent (including the "Sequencer.Message(SequencerMessages.Typed);").

The thing that skip to the next dialogue is the Sequencer. In its update, the delay time left reaches 0 and there are no queuedCommands or activeCommands.


- The delay time is always wrong, because it seems to come from "GetDefaultSubtitleDurationInSeconds" which does not take into account a custom typewriter. Should I change something so my custom typewriter feeds a proper duration? What if it's dynamic?
- Should I add a command every time my typewriter starts? What would be the best way to do this?


Thanks!
Alexis
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue does not wait for Custom Typewriter

Post by Tony Li »

Hi Alexis,

Your custom typewriter class is responsible for sending the message "Typed" when done:

Code: Select all

Sequencer.Message("Typed");
Sequences do not wait for the typewriter unless you've confirmed the sequence to wait for the "Typed" message. GetDefaultSubtitleDurationInSeconds determines the value of {{end}}, which is based on text length and the settings in the Dialogue Manager's Subtitle Settings section.
Alexis
Posts: 11
Joined: Fri Oct 16, 2020 11:34 am

Re: Dialogue does not wait for Custom Typewriter

Post by Alexis »

Thanks, I must have missed it in the documentation!

For anyone having a similar issue, the solution was to change the default sequence in the Dialogue Manager from
Delay({{end}})
to
Continue()@Message(Typed)
Post Reply