Re: Help with Repeatable Conversation and Node Tracking
Posted: Tue Nov 19, 2024 9:29 pm
This is working for me, so this can be closed if you'd like, I'm just trying to resolve my confusion on the workflow, which I'll probably just need to read the docs more closely for.
I think I may have been having a similar issue, or getting confused when using the stack, so I went back to trying this on a monobehaviour:
I think I may have been having a similar issue, or getting confused when using the stack, so I went back to trying this on a monobehaviour:
Code: Select all
private int _lastNodeID;
private string _lastConversationStarted;
public void SwitchToConversationAction(string conversation)
{
StartCoroutine(SwitchToConversationActionWork(conversation));
}
public IEnumerator SwitchToConversationActionWork(string conversation)
{
yield return new WaitForEndOfFrame();
_lastConversationStarted = DialogueManager.lastConversationStarted;
_lastNodeID = DialogueManager.currentConversationState.subtitle.dialogueEntry.id;
DialogueManager.StopConversation();
DialogueManager.StartConversation(conversation);
}
public void ContinueConversation()
{
DialogueManager.StopConversation();
DialogueManager.StartConversation(_lastConversationStarted, null, null, _lastNodeID);
}