Change Between Panels

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Kamotachi
Posts: 51
Joined: Fri Nov 29, 2019 9:03 pm

Change Between Panels

Post by Kamotachi »

Hello!
I'm a bit lost with some decisions.

In my game you can talk to NPCs and collect items. To talk to NPCs there is a conventional dialogue system.
To pick up items I have thought of using the DialogueSystem too:

A menu appears with a text, and the relevant buttons that are in the text node. For example:
- Do you want to pick this pretty flower? -Yes -No -Tread on it.

The case is that I want that the dialogs are visually of a way, and in the case of picking up objects it is seen of another one (although in essence they work the same).

Then I have 2 options.
1 - I don't know if I should create 2 different Dialogue UI, and call the one to pick up objects using “Override Dialogue UI” from the “Dialogue System Trigger” that the Items of the game have.
2 - Or to create a single Dialogue UI with two “Subtitle Panels” (one for dialogs, and the other as system text that asks you if you want to pick up the object), and with two “Response Panels” (one for dialogs, and the other as system buttons).

Which is the best option? In the case of the second one, how could I change the Panels as I need? I have created an Actor called “System” and in the “dialogue System Trigger” of the items I put the Sequence “SetPanel(System,1)”. That activates the system panel, but the Response buttons of the dialogs appear and not the second one.

What should I do? Maybe is "Override Dialogue UI” from the ‘Dialogue System Trigger’ the best way?
User avatar
Tony Li
Posts: 22655
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change Between Panels

Post by Tony Li »

Hi,

Use two different dialogue UIs and an Override Dialogue UI component.

For example, assign the regular conversation UI to the Dialogue Manager's Display Settings > Dialogue UI.

Then create a prefab for your interactable objects. Add an Override Dialogue UI, canvas, and interaction dialogue UI. Assign this dialogue UI to the Override Dialogue UI.


If, on the other hand, you had conversations that mixed different response menu panel styles within the same active conversation, you'd want to use a single dialogue UI with more than one response panel in it. Then you'd use the SetMenuPanel() sequencer command to specify which one to use next.
Kamotachi
Posts: 51
Joined: Fri Nov 29, 2019 9:03 pm

Re: Change Between Panels

Post by Kamotachi »

Hello!
I almost got it!

I find it cost effective to have it all within the same “Dialogue UI” because sometimes there are back-to-back changes from a "menu" to a "regular dialogue".

The only problem I'm having now is that one of the panels opens when it should not.
I put screenshots because I think it is clearer this way.

As you can see there are 3 “Subtitle Panels” and 3 “Menu Panels”.
Image
Each one is used in a different place.

This way it is seen in the hierarchy.
Image

To make the change of Panels and MenuPanels I do it from the Sequencer in an empty node (because it seems that, otherwise, it is activated later). I use:
SetPanel(System,2);
SetMenuPanel(System,2);
SetPanel(Joe,0);
SetMenuPanel(Joe,0);
Image

The first time it works fine, but once "Item Text Panel" has been opened once, it automatically opens again even if I'm activating "Action Text Panel". I can't understand why both are activated!

I have even tried to force close (by calling Close() ) from “On Open” inside the “Standart UI Subtitle Panel”. Still they both keep opening once they have been displayed for the first time.

I thought it might be because of the “Visivility” section that I have them set to “Until superceded or Actor Change”.
User avatar
Tony Li
Posts: 22655
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change Between Panels

Post by Tony Li »

Hi,

Can you send reproduction steps or a reproduction project to tony (at) pixelcrushers.com?
Kamotachi
Posts: 51
Joined: Fri Nov 29, 2019 9:03 pm

Re: Change Between Panels

Post by Kamotachi »

Hi Tony!

I have first wanted to thoroughly re-envision the whole thing...
It's already fixed, it took me a few days and it was a silly thing. :roll:
For some reason at some point I disabled “Deactivate On Hidden”, that's why it stayed open when I opened another panel.

Thanks a lot anyway! I find the dialog system spectacular, but even more your work in this forum and the always fast response!
User avatar
Tony Li
Posts: 22655
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change Between Panels

Post by Tony Li »

Hi,

Thanks! And good detective work in finding that setting.
Post Reply