Default sequence on all entries

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
TheAesthetik
Posts: 3
Joined: Sat Apr 15, 2023 6:21 am

Default sequence on all entries

Post by TheAesthetik »

Hello, I have been working with the Dialogue system for several months and I must say that it is impressive.

A question has arisen, and it is if it is possible to apply the default sequence in all the entries without having to put

Code: Select all

{{default}};
in each one individually. My entries are not blank so I have to use

Code: Select all

{{default}};
to make the default sequence apply

Thank you.
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Default sequence on all entries

Post by Tony Li »

Hi,

If you're sure you want to apply it to all dialogue entries, you can add a small C# script to the Dialogue Manager that has an OnConversationLine(Subtitle) method such as:

Code: Select all

void OnConversationLine(Subtitle subtitle)
{
    var defaultSequence = DialogueManager.conversationView.GetDefaultSequence(subtitle);
    subtitle.sequence = $"{defaultSequence}; {subtitle.sequence}";
}
However, there may be times when you want a specific dialogue entry to only play its own Sequence field, such as if it's set to "Continue()". So you may not really want to use that script. Instead, rather than having to type {{default}}, you could select the "+" menu > Include Default Sequence to add {{default}} without typing.
Post Reply