Resetting conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
antiporter
Posts: 5
Joined: Thu Sep 28, 2023 2:20 pm

Resetting conversation

Post by antiporter »

Hi.

I'm using Dialog[thisID].SimStatus ~= "WasDisplayed" to have each node appear only once. However, I want my conversations to be reusable. How can I reset the conversation so that the next time all the nodes would be available?
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Resetting conversation

Post by Tony Li »

Hi,

You could reset SimStatus at the end of the conversation. For example, add a script with this method to the Dialogue Manager GameObject:

Code: Select all

void OnConversationEnd(Transform actor)
{
    var conversation = DialogueManager.masterDatabase.GetConversation(DialogueManager.lastConversationID);
    conversation.dialogueEntries.ForEach(entry => DialogueLua.MarkDialogueEntryUntouched(entry));
}
antiporter
Posts: 5
Joined: Thu Sep 28, 2023 2:20 pm

Re: Resetting conversation

Post by antiporter »

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

Re: Resetting conversation

Post by Tony Li »

Glad to help!
Post Reply