I have created several conversations with a Dialogue UI that includes a Typewriter effect for the NPC that is talking. However on some of the lines the typewriter effect will prematurely skip to the end, as if the user has pressed the continue button. It consistently does this for some particular lines and not others. It always skips at the same point, skipping over the last ten or so characters in the line.
I can't tell what is different from one conversation to another. They are all using the same Dialogue UI with the same Typewriter component on the same subtitle. There must a setting I'm not seeing. Any ideas? Thanks!
Re: Typewriter effect skips prematurely, sometimes
Posted: Mon Aug 26, 2024 8:20 am
by Tony Li
Hi,
I'm guessing the subtitle's Sequence has finished before the typewriter has finished. Please see:
Re: Typewriter effect skips prematurely, sometimes
Posted: Mon Aug 26, 2024 8:46 am
by JimMakesGames
Thanks for the quick reply!
I've read through those and I think I understand. But it seems to me that if I set the Subtitle Chars Per Second in the Dialogue Manager to the same value as the Characters Per Second in the TypeWriterEffect component, shouldn't that make them always sync up? They sometimes do but not always though. What am I missing? I've read the posts you shared several times but I'm afraid I still don't get it.
Re: Typewriter effect skips prematurely, sometimes
Posted: Mon Aug 26, 2024 8:55 am
by JimMakesGames
I currently have the Continue Button setting in the Dialogue System Controller set to Optional which is the behaviour I want. The issue with the skipping of the subtitles goes away if I set it to Always though.
Re: Typewriter effect skips prematurely, sometimes
Posted: Mon Aug 26, 2024 8:56 am
by Tony Li
It should. You may need to temporarily set the Dialogue Manager's Other Settings > Debug Level to Info and trace through the Console logs to see what's going on. More info on that here:
Also check those lines that skip ahead prematurely. If they have something in their Sequence fields that makes their sequences shorter than {{end}}, that could be the issue.
Re: Typewriter effect skips prematurely, sometimes
Posted: Mon Aug 26, 2024 9:08 am
by Tony Li
JimMakesGames wrote: ↑Mon Aug 26, 2024 8:55 am
I currently have the Continue Button setting in the Dialogue System Controller set to Optional which is the behaviour I want. The issue with the skipping of the subtitles goes away if I set it to Always though.
Inspect one of the nodes that ends prematurely, and look at its Sequence field. Add this to the beginning of the Sequence field:
The node's current Sequence is probably ending early.
Re: Typewriter effect skips prematurely, sometimes
Posted: Mon Aug 26, 2024 9:19 am
by JimMakesGames
I tried setting the Sequence field of the node to Delay({{end}}); and {{default}}; but neither made a difference.
I've enabled the logging and the two relevant log messages that I get when the dialogue runs are:
Dialogue System: Sequencer.Play( Delay(2.75)@0 )
Dialogue System: Sequencer: Delay(2.75)
The line is 55 characters long, but it skips to the end 11 or 12 characters before the end.
Here's how it looks
npcsubtitle.gif (33.45 KiB) Viewed 311 times
Re: Typewriter effect skips prematurely, sometimes
Posted: Mon Aug 26, 2024 9:24 am
by JimMakesGames
I figured it out!
I had set the Delay Typewriter Until Open field in the Standard UI Subtitle Panel to true. So I guess that was causing the typewriter to start at a different time than the subtitle panel became visible, because it was waiting for the animation effect.
Re: Typewriter effect skips prematurely, sometimes
Posted: Mon Aug 26, 2024 9:54 am
by Tony Li
Good catch!
If you want it to be exact, you could identify how long the "show" animation is. For example, if the animation is 0.5 seconds, then you can set the Dialogue Manager's Default Sequence to: