Conversation starts after ending

Announcements, support questions, and discussion for the Dialogue System.
tony_lance
Posts: 14
Joined: Thu Jun 07, 2018 12:08 am

Conversation starts after ending

Post by tony_lance »

I'm using the rewired integration and I have my conversations set to always require the continue button pressed. The game is controlled with a gamepad/keyboard (not the mouse) and I'm using the proximity selector to start conversations.

The problem I'm having is that when you press the controller button to continue on the last conversation node, it ends up starting the conversation over. I have the conversation trigger set to "exclusive". This is a new project and the latest version of dialogue system grabbed from the unity asset store yesterday, so I'm just using the default components.

I remember having this problem in a past project but I can't remember what I did to fix it! Hopefully this is a common issue..? :shock:
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation starts after ending

Post by Tony Li »

Hi,

Have you tried adding a Dialogue System Events component to the player? Configure the OnConversationStart() event to disable the Proximity Selector and OnConversationEnd() to re-enable it.
tony_lance
Posts: 14
Joined: Thu Jun 07, 2018 12:08 am

Re: Conversation starts after ending

Post by tony_lance »

I should have mentioned-- yes! I did already try that, but it didn't solve the issue.
tony_lance
Posts: 14
Joined: Thu Jun 07, 2018 12:08 am

Re: Conversation starts after ending

Post by tony_lance »

One more thing-- I set the debug level to "info" but i'm not getting any console messages related to when starting or ending a conversation. Just the init-related dialogue engine messages.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation starts after ending

Post by Tony Li »

Is the Console window filtering out Info messages? (Check the icons in the upper right of the window.)

For the original issue, try adding this script to your player:

OneFrameAfterConversationEnd.cs

Code: Select all

using UnityEngine;
using UnityEngine.Events;
public class OneFrameAfterConversationEnd : MonoBehaviour
{
    public UnityEvent onFrameAfterConversationEnd = new UnityEvent();

    void OnConversationEnd(Transform actor)
    {
        onFrameAfterConversationEnd.Invoke();
    }
}
It will add a UnityEvent named OnFrameAfterConversationEnd(). Configure it to re-enable the Proximity Selector instead of using the Dialogue System Events' OnConversationEnd().
tony_lance
Posts: 14
Joined: Thu Jun 07, 2018 12:08 am

Re: Conversation starts after ending

Post by tony_lance »

Ok now I'm thinking there's something wrong with the messages. I do have all console messages toggled to show up but I'm not seeing anything but the dialogue init messages. I also noticed that my dialogue system events component is not actually switching off the proximity sensor at all, so maybe it's not receiving the messages? I have my dialogue-related console messages attached.
Attachments
dialogue.PNG
dialogue.PNG (119.03 KiB) Viewed 600 times
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation starts after ending

Post by Tony Li »

Any idea why this line is being logged?

Code: Select all

Dialogue System: Loaded master database ''
The dialogue database asset file assigned to the Dialogue Manager's Initial Database should have a name, so it shouldn't be showing an empty string.

Is it possible that something else in your project is setting the Dialogue Manager's Debug Level to Warning or None?
tony_lance
Posts: 14
Joined: Thu Jun 07, 2018 12:08 am

Re: Conversation starts after ending

Post by tony_lance »

Yeah that is weird, I can see at runtime that it definitely has the database attached and the debug level is still set to info (I definitely haven't messed with that). I've tried switching to the demo database and that outputs the same empty string in the console. The dialoge system demo scene works as intended...

I have multiple scenes loaded, could that be a factor in some way? I've tried replacing my manager in my scene with the demo manager and in that case it also outputs the database name as an empty string.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation starts after ending

Post by Tony Li »

Multiple scenes should be fine. But, as a test, could you try a single scene?
tony_lance
Posts: 14
Joined: Thu Jun 07, 2018 12:08 am

Re: Conversation starts after ending

Post by tony_lance »

Ok I'm not sure how I got it to work but... it's working now. I still get an empty string but the messages are correctly turning off my proximity selector. I don't even need to turn it off now, the conversations no longer restart. I didn't end up making a single-scene version, I just remade the manager (again) using the wizard (again) and... I don't know. It works.
Post Reply