Page 1 of 1

Change conversation

Posted: Tue Apr 25, 2023 3:19 pm
by dryuk
Hello, I want to change the scene and conversation with this. For this, I do next

Code: Select all

IEnumerator NewSceen(int ind)
    {
        DSC.StopConversation();
        DSC.StartConversation("Second");
        yield return new WaitForSeconds(1f);
        SceneManager.LoadScene(ind);
    }
I receive this message and the conversation don't change
Dialogue System: Another conversation is already active. Not starting

Re: Change conversation

Posted: Tue Apr 25, 2023 3:52 pm
by Tony Li
Hi,

I notice you're using DSC.StopConversation(). Does your scene have more than one Dialogue Manager?

If not, try:

Code: Select all

DialogueManager.StopAllConversations();
DialogueManager.StartConversation("Second");
You don't need a reference to the Dialogue Manager's DialogueSystemController.

Re: Change conversation

Posted: Wed Apr 26, 2023 5:23 am
by dryuk
If I set this to false, everything is good
1.png
1.png (35.74 KiB) Viewed 707 times

But with true I have the same error.
I need true for the set

Code: Select all

PixelCrushers.DialogueSystem.DialogueLua.SetVariable
Does your scene have more than one Dialogue Manager?
Yes, I have one conversation in the scene.

Re: Change conversation

Posted: Wed Apr 26, 2023 7:54 am
by Tony Li
Why did you untick the Dialogue Manager's Don't Destroy On Load checkbox? (This info will help me provide a better answer to you.)

Have you tried DialogueManager.StopAllConversations()?

If don't understand your question about DialogueLua.SetVariable(). How can I help?

Re: Change conversation

Posted: Wed Apr 26, 2023 8:56 am
by dryuk
This doesn't help me.
DialogueManager.StopAllConversations()
I resolve my problem using a workaround with PlayerPrefs

Thanks for helping

Re: Change conversation

Posted: Wed Apr 26, 2023 10:05 am
by Tony Li
I'm glad you got it working.