Page 1 of 1

Using C# script to go to a specific conversation line

Posted: Mon Oct 26, 2020 1:55 am
by zeroxpy
In my conversation, I have a scene event (in C# script) which (if triggered) should fast forward the conversation by several lines. I am wondering about the best way to achieve this, preferably also in C# script. Thank you! :D

Re: Using C# script to go to a specific conversation line

Posted: Mon Oct 26, 2020 9:19 am
by Tony Li
Hi,

Do you know which dialogue entry you want to fast forward to? If so, you can jump to that dialogue entry:

Code: Select all

// Look up the dialogue entry that you want to jump to:
var entry = DialogueManager.masterDatabase.GetDialogueEntry(conversationID, entryID);
// Jump the conversation model to that entry and get the conversation state:
var state = DialogueManager.conversationModel.GetState(entry);
// Show the state:
DialogueManager.conversationController.GotoState(state);
API References: