Hi,
To interrupt the conversation:
Code: Select all
string savedConversationTitle;
int savedEntryID;
Transform savedActor;
Transform savedConversant;
savedConversationTitle = DialogueManager.lastConversationStarted;
savedEntryID = DialogueManager.currentConversationState.subtitle.dialogueEntry.id;
savedActor = dialogueManager.currentActor;
savedConversant = DialogueManager.currentConversant;
DialogueManager.StopConversation();
// Then start a new conversation:
DialogueManager.StartConversation(...)
To resume the saved conversation:
Code: Select all
DialogueManager.StartConversation(savedConversationTitle, savedActor, savedConversant, savedEntryID);
However, if you want to temporarily dip into another conversation and then pop back to the previous conversation as if it's part of the same conversation, you can use the conversation position stack:
Code: Select all
ConversationPositionStack.PushConversationPosition();
var newEntry = DialogueManager.masterDatabase.GetConversation(name).GetFirstDialogueEntry();
var newState = DialogueManager.conversationModel.GetState(newEntry);
DialogueManager.conversationView.GotoState(newState);
The end of that conversation can call PopConversationPosition() in the Script field, or you can call it in C#. Make sure you've added a ConversationPositionStack component to your Dialogue Manager.