Problem with Custom Subtitle Dialogue Panel

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
phoot
Posts: 15
Joined: Wed Sep 13, 2023 3:21 pm

Problem with Custom Subtitle Dialogue Panel

Post by phoot »

Hi,

I'm having trouble with a custom subtitle Panel I created based on the standard dialogue gui that shipped with the asset (cool asset, needs a lot of learning for a newb like me tho, so bear with me...). I want to implement a variety of interactables that will display a text when triggering the Dialogue System trigger OnTriggerEnter event, which happens when the player touches the interactable's trigger collider. And as soon as the player leaves said collider I want the dialogue panel to automatically close.

Expected behaviour
  • Player enters interactable's trigger collider, panel opens and displays relevant conversation.
  • Player leaves interactable's trigger collider, panel closes.
Actual behaviour
Player enters interactable's trigger collider, panel opens and displays relevant conversation.
But on higher move speed like a dash, panel does not properly close.

This is a small clip of that behaviour: https://imgur.com/a/7Svvx4r

I've seen that at high move speed the Dialogue's animator gets stuck in the show state and doesn't leave it anymore:
https://imgur.com/a/eplphM4
I've tried fixing it myself by playing around with different transitions/settings but to no avail.

Could anyone give me a hint what I could try?
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with Custom Subtitle Dialogue Panel

Post by Tony Li »

Hi,

How are you configuring the conversation to end when the player exits the trigger collider? Are you using a Dialogue System Trigger? If so, are you using the checkbox to end the conversation if the player exits the trigger collider?

When the issue happens, does the subtitle panel disappear after 10 seconds? This will provide some information about what exactly is going on.
phoot
Posts: 15
Joined: Wed Sep 13, 2023 3:21 pm

Re: Problem with Custom Subtitle Dialogue Panel

Post by phoot »

Hi Tony,

thanks a lot for your swift reply. I've taken screenshots from the signpost's and the dialogue system's inspector:
https://imgur.com/a/n8ruc1q

I hope the information you need is in there. Concerning your questions:
  • Yes, the "Stop conversation on Trigger Exit" box is checked.
  • Yes, I'm using a Dialgue System Trigger component on the signpost interactable.
  • I've set the "Min Subtitle Seconds" to 999, as I thought it would be a simple way to make it "permanent" until the player leaves the trigger zone, assuming no player ever will spend 999 seconds in front of the signpost. As such the panel persists "indefinitely", even when I transition to another scene via a dialogue system portal
Thank you again for your time.
phoot
Posts: 15
Joined: Wed Sep 13, 2023 3:21 pm

Re: Problem with Custom Subtitle Dialogue Panel

Post by phoot »

Does no one have clue how to solve this, or run into similar problems and could give me a hint? I haven't found a solution yet and I can't postpone this bugfix for much longer. :sad:
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with Custom Subtitle Dialogue Panel

Post by Tony Li »

I'm so sorry; my reply didn't post for some reason. If you ever fail to get a reply from me within 24 hours (usually in less than 12 hours), please follow up. I always reply within 24 hours. I don't know what happened to my reply here.

To determine whether the issue is the animator or something else, temporarily use a duplicate copy of your dialogue UI, and assign this duplicate to the Dialogue Manager's Display Settings > Dialogue UI field. Then inspect the Dialogue Panel and subtitle panel. Remove the Animator component from each, and clear the Show Animation Trigger and Hide Animation Trigger fields. Then play the scene and check if the issue is gone. Since there's no Animator, the UI panel will instantly appear and disappear instead of fading in.

If there's still an issue, it's probably not related to the Animators.

If the UI panel correctly disappears when running through the area quickly, the issue is with the Animators. Inspect the Canvas Group Animator Controller asset, and click on the transition arrow from Any State to Show. In the Inspector, UNtick Ordered Interruption and set Transition Duration to 0. Repeat for the arrow from Any State to Hide. I recommend making this change to a duplicate copy of Canvas Group Animator Controller and assigning that duplicate to your UI panels' Animators. This way you won't overwrite your changes when you update the Dialogue System.

---

Alternatively, instead of using a conversation, you could use the Dialogue System's Proximity Selector:
  • Add a Proximity Selector to the player.
  • Remove the Dialogue System Trigger from the signpost.
  • Add a Usable component to the signpost.
  • Add an instance of Basic Standard Usable UI as a child of the signpost. Customize its appearance to show your text (e.g., "Start game without tutorial, etc.").
When the player is inside the signpost's trigger collider, it will show the usable UI. Since nothing is hooked up to the Usable component's OnUse() event, it won't do anything.
phoot
Posts: 15
Joined: Wed Sep 13, 2023 3:21 pm

Re: Problem with Custom Subtitle Dialogue Panel

Post by phoot »

Hi Tony,

Thank you for your step-by-step debugging instructions. I attached a modified copy exactly as you specified, and the problem persists. We should conclude that it's probably not the Animator then.

After confirming this I've tried a brute force approach by adding a Script to the interactable that does exactly one thing:

Code: Select all

OnTriggerExit2D() {
	DialogueManager.StopConversation();
}
It actually worked as intended. And interestingly enough, when I inspect the animator at Runtime the Hide trigger fires correctly even at high move speed and it now reaches the Hide state.

So I'll keep it this way for now and here's hoping I don't have to necro this thread in a later development stage. Thank you for your support!
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with Custom Subtitle Dialogue Panel

Post by Tony Li »

Sounds good. We can always revisit it if any issues arise.
Post Reply