Page 1 of 1

ConversationHasValidEntry not working correctly

Posted: Sat Aug 19, 2023 6:47 pm
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);
        }

Re: ConversationHasValidEntry not working correctly

Posted: Sat Aug 19, 2023 8:25 pm
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.