Hello,
I have something like this above and want to complete the single player subtitle's latter part with the response that I have.'
What is best solution for it?
Completing the prior subtitle text with current response?
Re: Completing the prior subtitle text with current response?
Hi,
You can define a custom Boolean field for your dialogue entries, such as "AddToNext". In the "I mean..." node, set the field to True.
Then add a script to the Dialogue Manager that has an OnConversationLine method. Something like:
This method will check if AddToNext is true. If so, it will remember the subtitle's text and add it to the next subtitle.
You can define a custom Boolean field for your dialogue entries, such as "AddToNext". In the "I mean..." node, set the field to True.
Then add a script to the Dialogue Manager that has an OnConversationLine method. Something like:
Code: Select all
private string textToAdd = string.Empty;
void OnConversationLine(Subtitle subtitle)
{
subtitle.formattedText.text = textToAdd + subtitle.formattedText.text;
textToAdd = Field.LookupBool(subtitle.dialogueEntry.fields, "AddToNext") ? subtitle.formattedText.text : string.Empty;
}
Re: Completing the prior subtitle text with current response?
Hi,
Is it possible to add it to the previous one?
For instance,
"I mean.." actually stays longer than those 2 responses. After I click on either of that, it will change the previous node which is "I mean..." to "I mean.. you are fine".
Since the "I mean.." node disappear after those 2 responses disappear, it will be much natural for the conversation flow.
Is it possible to add it to the previous one?
For instance,
"I mean.." actually stays longer than those 2 responses. After I click on either of that, it will change the previous node which is "I mean..." to "I mean.. you are fine".
Since the "I mean.." node disappear after those 2 responses disappear, it will be much natural for the conversation flow.
Re: Completing the prior subtitle text with current response?
Here's a small example scene using the script above. It was made in Unity 2020.1.
DS_AddToNextExample_2020-10-20.unitypackage
DS_AddToNextExample_2020-10-20.unitypackage