Typewriter effect skips prematurely, sometimes
-
- Posts: 6
- Joined: Mon Aug 26, 2024 7:43 am
Typewriter effect skips prematurely, sometimes
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!
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
Hi,
I'm guessing the subtitle's Sequence has finished before the typewriter has finished. Please see:
Also maybe related/helpful:
I'm guessing the subtitle's Sequence has finished before the typewriter has finished. Please see:
Also maybe related/helpful:
-
- Posts: 6
- Joined: Mon Aug 26, 2024 7:43 am
Re: Typewriter effect skips prematurely, sometimes
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.
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.
-
- Posts: 6
- Joined: Mon Aug 26, 2024 7:43 am
Re: Typewriter effect skips prematurely, sometimes
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
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.
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
Inspect one of the nodes that ends prematurely, and look at its Sequence field. Add this to the beginning of the Sequence field: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.
Code: Select all
{{default}};
Code: Select all
Delay({{end}});
-
- Posts: 6
- Joined: Mon Aug 26, 2024 7:43 am
Re: Typewriter effect skips prematurely, sometimes
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
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
-
- Posts: 6
- Joined: Mon Aug 26, 2024 7:43 am
Re: Typewriter effect skips prematurely, sometimes
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.
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
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:
This will start the Delay({{end}}) at the 0.5 second mark, which is when the show animation has finished.
Alternatively, you can simply wait for the typewriter to send the "Typed" message, indicating that it's done typing:
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:
Code: Select all
Delay({{end}})@0.5
Alternatively, you can simply wait for the typewriter to send the "Typed" message, indicating that it's done typing:
Code: Select all
WaitForMessage(Typed)
-
- Posts: 6
- Joined: Mon Aug 26, 2024 7:43 am
Re: Typewriter effect skips prematurely, sometimes
Ah that's excellent. Thank you for all your help!