How to show Response menu immediately when the PC subtitles start being displayed (and while they are being written out)

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Davids
Posts: 2
Joined: Wed Jun 19, 2024 12:40 pm

How to show Response menu immediately when the PC subtitles start being displayed (and while they are being written out)

Post by Davids »

How to show Response menu immediately when the PC subtitles start being displayed (and while they are being written out Not after that) and be able to select some options and proceed to the next event before the subtitle text is finished being written

Something similar to what is shown in "The Way of Wrath" game that use this plugin
or "Fears to Fathom" series

thanks
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to show Response menu immediately when the PC subtitles start being displayed (and while they are being written

Post by Tony Li »

Hi,

Make a subclass of StandardUISubtitlePanel and override the FinishSubtitle() method to not stop the typewriter:

Code: Select all

public class MySubtitlePanel : StandardUISubtitlePanel
{
    public override void FinishSubtitle()
    {
        HideContinueButton();
    }
}
Use this in place of your StandardUISubtitlePanel component.

Then configure the subtitle to stop right away (e.g., set Sequence / Default Sequence to "Continue()@0"). More info: How To: Control the Duration of Subtitle Text
Davids
Posts: 2
Joined: Wed Jun 19, 2024 12:40 pm

Re: How to show Response menu immediately when the PC subtitles start being displayed (and while they are being written

Post by Davids »

Thanks, it works fine...

I'm not good at programming, and I don't understand the override process. Just dragging the MySubtitlePanel.cs file to the inspector for the StandardUISubtitlePanel script in the Subtitle Panel doesn't seem to make any change, so I overwrote the source to:

Code: Select all

public virtual void FinishSubtitle()
        {
            HideContinueButton();
            //var typewriter = GetTypewriter();
            //if (typewriter != null && typewriter.isPlaying) typewriter.Stop();
        }
Anyway, with the Continue()@0, it works fine.
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to show Response menu immediately when the PC subtitles start being displayed (and while they are being written

Post by Tony Li »

Hi,

I provided a link (here too) that explains how to replace the StandardUISubtitlePanel component with a subclass. I recommend doing this if you feel up to it. Otherwise you will need to remember to make the same change to StandardUISubtitlePanel.cs again when you update the Dialogue System, since the update will overwrite StandardUISubtitlePanel.cs with the original version.
Post Reply