Page 1 of 1

Resetting conversation

Posted: Thu Sep 28, 2023 2:24 pm
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?

Re: Resetting conversation

Posted: Thu Sep 28, 2023 2:50 pm
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));
}

Re: Resetting conversation

Posted: Thu Sep 28, 2023 3:40 pm
by antiporter
Thank you!

Re: Resetting conversation

Posted: Thu Sep 28, 2023 7:23 pm
by Tony Li
Glad to help!