Page 1 of 1
Dialogue Replace option with script
Posted: Mon Aug 08, 2022 8:32 pm
by Fearinhell
So I see in the triggers the Replace option, but how would I get replace to work while in C# code? My line I want is
DialogueManager.StartConversation("AlliBaby"+AlliBabyC);
Any help would be appreciated.
Re: Dialogue Replace option with script
Posted: Mon Aug 08, 2022 8:45 pm
by Tony Li
The Replace option stops any active conversations before starting the Dialogue System Trigger's conversation.
You can use DialogueManager.StopAllConversations() in C#:
Code: Select all
// Replace any active conversations with the conversation "AlliBaby"+AlliBabyC:
DialogueManager.StopAllConversations();
DialogueManager.StartConversation("AlliBaby"+AlliBabyC);
Re: Dialogue Replace option with script
Posted: Mon Aug 08, 2022 9:59 pm
by Fearinhell
I get a DialogueManager does not containt a definition for StopAllConversations.
Re: Dialogue Replace option with script
Posted: Mon Aug 08, 2022 10:06 pm
by Fearinhell
I havent updated it in a few months, was this recently added?
Re: Dialogue Replace option with script
Posted: Mon Aug 08, 2022 10:11 pm
by Fearinhell
Ok I see I have .24 and this was added in .25. I do not have an option to update I just have download and start over?
Re: Dialogue Replace option with script
Posted: Mon Aug 08, 2022 11:04 pm
by Fearinhell
I think I got it.
Re: Dialogue Replace option with script
Posted: Tue Aug 09, 2022 8:25 am
by Tony Li
Great! Yes, you're correct; just download and import the update on top of your existing Dialogue System. So you should be in good shape now.
In the future, I recommend backing up your project before updating the Dialogue System in case you've directly modified some Dialogue System files. I also recommend not directly modifying Dialogue System files. Instead, use the provided hooks for script customizations, and use prefab variants or duplicates for prefab customizations.