Page 1 of 1

Cannot continue to new conversation if previous one ignored

Posted: Tue Mar 16, 2021 6:42 pm
by Espes
Hello, If the player ignores conversation, although Response timeout is set to 5 and Response timeout Action is set to End conversation if the players changes scene, the conversation remains incomplete and new conversation does not trigger. I use the ConversationZone Corgi Support.

Thank you!

Re: Cannot continue to new conversation if previous one ignored

Posted: Tue Mar 16, 2021 8:36 pm
by Tony Li
Hi,

Changing scenes shouldn't have an effect on the response timeout.

Does the player change scenes while the response menu is visible?

Can you send a reproduction project (including steps to follow) to tony (at) pixelcrushers.com?

Re: Cannot continue to new conversation if previous one ignored

Posted: Wed Mar 17, 2021 6:02 pm
by Espes
Does the player change scenes while the response menu is visible?
Yes, exactly then.

I will try to make a repro and send it!

Re: Cannot continue to new conversation if previous one ignored

Posted: Sat Mar 20, 2021 7:16 pm
by Espes
I' ve send a repro!

Re: Cannot continue to new conversation if previous one ignored

Posted: Sat Mar 20, 2021 9:07 pm
by Tony Li
Hi,

Thanks for sending the reproduction project.

Conversations are allowed to stay active across scene changes. The new conversation can't start because the previous one is still active. You just can't see it because you've left the scene and the dialogue UI bubbles were in the previous scene.

Since you're using Corgi's FinishLevel script, I recommend writing and using a subclass that stops any active conversation:

Code: Select all

using UnityEngine;
using System.Collections;
using MoreMountains.Tools;
using MoreMountains.Feedbacks;
namespace MoreMountains.CorgiEngine
{
    public class CustomFinishLevel : FinishLevel
    {
        public override void GoToNextLevel()
        {
            PixelCrushers.DialogueSystem.DialogueManager.StopConversation();
            base.GoToNextLevel();
        }
    }
}
---

Corgi doesn't yet have data persistence across scene changes. If you want to save info across scene changes with the Dialogue System's save system, you'll need to call two methods before changing scenes and one method after. To do that, change your custom FinishLevel subclass's GoToNextLevel() method to:

Code: Select all

        public override void GoToNextLevel()
        {
            PixelCrushers.DialogueSystem.DialogueManager.StopConversation();
            PixelCrushers.SaveSystem.RecordSavedGameData();
            PixelCrushers.SaveSystem.BeforeSceneChange();
            base.GoToNextLevel();
        }
Then make and use a subclass of LevelManager that overrides the GotoLevelCo coroutine:

Code: Select all

public class CustomLevelManager : LevelManager
{
    protected override IEnumerator GotoLevelCo(string levelName, bool fadeOut = true)
    {
        yield return base.GotoLevelCo(levelName, fadeOut);
        PixelCrushers.SaveSystem.ApplySavedGameData();
    }
}