skip Conversation with delay?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
robster21
Posts: 36
Joined: Tue Aug 23, 2022 9:02 am

skip Conversation with delay?

Post by robster21 »

https://www.pixelcrushers.com/phpbb/vie ... kip#p37772

Hello, I'm using ConversationControl.cs to skip Conversation Line with Skip button.
SkipAll() is really good, but I want to take a delay when I click the Skip button.

I want like this)
Click the Skip button -> wait for 0.2sec ->Release all text of the subtitle
-> Go to Next Conversation Line(without click a Continue button)

And I don't want to skip a Conversation Line when it's not displayed.
How can I do?
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: skip Conversation with delay?

Post by Tony Li »

Hi,

You can duplicate the ConversationControl script, give the file and class a new name (such as CustomConversationControl), and change the behavior to your liking.

For example, you could change the OnConversationLine method to:

Code: Select all

void OnConversationLine(Subtitle subtitle)
{
    // Only apply SkipAll if the current dialogue entry has text:
    if (skipAll && !string.IsNullOrEmpty(subtitle.formattedText.text))
    {
        subtitle.sequence = "Continue()";
    }
}
Then use your new class in place of ConversationControl.
Post Reply