Page 1 of 1

Default sequence on all entries

Posted: Sat Apr 15, 2023 6:41 am
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.

Re: Default sequence on all entries

Posted: Sat Apr 15, 2023 7:59 am
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.