ConversationHasValidEntry not working correctly

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
lenster
Posts: 6
Joined: Sat Aug 19, 2023 7:58 am

ConversationHasValidEntry not working correctly

Post by lenster »

Hey,

I'm using the ink integration, I have a script where on awake all inkTriggers are added to a list and then I can check at any point whether a character has any valid conversations to show sphere above their head with the code below. However, this code doesn't seem to work, the ConversationHasValidEntry always returns true even when in the inspector all triggers have their conditions as false. In the debug log it's literally giving back the first trigger component on the character and that clearly says false in the inspector but it still returns true in this method.

Code: Select all

public void CheckAvailableDialogue()
        {
            foreach (DialogueSystemInkTrigger dialogueSystemInkTrigger in dialogueSystemInkTriggers)
            {
                if (PixelCrushers.DialogueSystem.DialogueManager.ConversationHasValidEntry(dialogueSystemInkTrigger.conversation))
                {
                    newDialogueAvailableSphere.SetActive(true);

                    Debug.Log(dialogueSystemInkTrigger.conversation);

                    return;
                }
            }

            Debug.Log("invalid");

            newDialogueAvailableSphere.SetActive(false);
        }
Attachments
Screenshot 2023-08-19 at 23.46.45.png
Screenshot 2023-08-19 at 23.46.45.png (66.23 KiB) Viewed 119 times
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: ConversationHasValidEntry not working correctly

Post by Tony Li »

Hi,

The Ink integration works differently from all other external format integrations because it hands off all processing to Ink. For the Ink integration, ConversationHasValidEntry will always return true because it can always start the Ink story. It doesn't know if Ink can continue the story until it has actually started it.
Post Reply