Cannot continue to new conversation if previous one ignored

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Espes
Posts: 24
Joined: Sun Aug 16, 2020 12:29 pm

Cannot continue to new conversation if previous one ignored

Post 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!
User avatar
Tony Li
Posts: 22116
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cannot continue to new conversation if previous one ignored

Post 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?
Espes
Posts: 24
Joined: Sun Aug 16, 2020 12:29 pm

Re: Cannot continue to new conversation if previous one ignored

Post 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!
Espes
Posts: 24
Joined: Sun Aug 16, 2020 12:29 pm

Re: Cannot continue to new conversation if previous one ignored

Post by Espes »

I' ve send a repro!
User avatar
Tony Li
Posts: 22116
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cannot continue to new conversation if previous one ignored

Post 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();
    }
}
Post Reply