Page 1 of 3

How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Fri Jan 19, 2024 6:58 pm
by need_verification
Hello, I am trying to find a way to change the Dialogue Panel based on the current dialogue entry.

I have a "Default Panel" that I want to sometimes switch to a "Thinking Panel" for the MC's Inner thoughts.
The "Thinking panel" has an animated thought cloud.

I tried to Override the Dialogue UI
https://www.pixelcrushers.com/dialogue_ ... e_u_i.html

But it won't let me decided when to turn off and on the "Thinking Panel" and it only acts as an overlay and doesn't turn off the "Default Panel"?

I also tried
Set Panel ()

I would have to add a Dialogue Actor to my "thinking Panel" and i don't think i'm supposed to do that?


SetDialougePanel ()
This only shows/hide the default panel :c

Switching Background Images?
The thinking panel has an animated thought bubble, so I would have to somehow have it show up too

Any help is greatly appreciated! Thank you.

Re: How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Fri Jan 19, 2024 7:05 pm
by Tony Li
Hi,

Can you make the Thinking Panel a subtitle panel in your dialogue UI? For example, the VN Template Standard Dialogue UI prefab has 3 subtitle panels. They're assigned to the Standard Dialogue UI component's Conversation UI Elements > Subtitle Panels list as numbers 0, 1, and 2.

If you assign your Thinking Panel to the Subtitle Panels list as panel number 2, you can include "[panel=2]" in your Dialogue Text to show that line in the Thinking Panel.

If your dialogue UI has an overall Dialogue Panel that has visible elements, you can either (1) move the visible elements to the other subtitle panels, or (2) place your Thinking Panel outside of the Dialogue Panel. If you do (2), then you can configure the Thinking Panel's OnOpen() UnityEvent to hide the Dialogue Panel and configure OnClose() to show the Dialogue Panel again.

Re: How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Fri Jan 19, 2024 7:50 pm
by need_verification
Tony Li wrote: Fri Jan 19, 2024 7:05 pm Hi,

Can you make the Thinking Panel a subtitle panel in your dialogue UI? For example, the VN Template Standard Dialogue UI prefab has 3 subtitle panels. They're assigned to the Standard Dialogue UI component's Conversation UI Elements > Subtitle Panels list as numbers 0, 1, and 2.

If you assign your Thinking Panel to the Subtitle Panels list as panel number 2, you can include "[panel=2]" in your Dialogue Text to show that line in the Thinking Panel.

If your dialogue UI has an overall Dialogue Panel that has visible elements, you can either (1) move the visible elements to the other subtitle panels, or (2) place your Thinking Panel outside of the Dialogue Panel. If you do (2), then you can configure the Thinking Panel's OnOpen() UnityEvent to hide the Dialogue Panel and configure OnClose() to show the Dialogue Panel again.
Assigned Thinking Panel to the Subtitles Panel list and wrote [panel=4] in the dialogue text, but it didn't seem to work? I probably did something wrong, but i'm not sure what :c
Image
Image


------------------

Method 2

I put it out side of the Dialogue, added open and close, then
Image
Image

and then... I wasn't sure how to call the OnOpen function? So I tried this, but I was really wrong T_T I'm sorry


Image



-----------------

Sorry if I am doing this wrong, I am really thankful for the help :c

Re: How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Fri Jan 19, 2024 11:11 pm
by Tony Li
Hi,

Try clearing the OnOpen() and OnClose() events for now. Does it work? Does the line "I'm the pilot" appear in the Thinking Panel?

Also, make sure the correct dialogue UI is assigned to the Dialogue Manager's Display Settings > Dialogue UI field.

Re: How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Sat Jan 20, 2024 12:02 am
by need_verification
Tony Li wrote: Fri Jan 19, 2024 11:11 pm Hi,

Try clearing the OnOpen() and OnClose() events for now. Does it work? Does the line "I'm the pilot" appear in the Thinking Panel?

Also, make sure the correct dialogue UI is assigned to the Dialogue Manager's Display Settings > Dialogue UI field.
Correct UI is Assigned
Image

The "Thinking Panel" does appear, and the button works, but the text does not

Before (Default Panel)
Image
After (Thinking Panel)

Image



Since the text doesn't appear, I tried moving it ontop of "thinking panel" but when I move it, all the buttons stop working

Image

Re: How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Sat Jan 20, 2024 12:35 am
by need_verification
I also tried using Override Display Settings. I coped the Default Panel exactly, and just changed the colors and added it to the "player actor"

Image

Image

but it displays this unknown UI instead of the one I added to the field

Image

but maybe trying to figure out the override display settings is a better option? I just have to figure out how to do it on certain conversation entry's

Re: How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Sat Jan 20, 2024 1:49 am
by need_verification
IT TOOK LIKE 6 HOURS, BUT I FINALLY GOT IT WORKING!!!! THE ONLY THING IS,

I can't back track to any dialogue entry with "panel=4" T_T is there a way to fix this? Thank you so much for the support


--------------------
How I did it:

Step 1 - Create a Panel and add a standard UI Subtitle Panel
Image
Image

Step 2 - Create a second panel, this is your background Image
Image

Step 3 - Create a textbox (if you don't want to use the default one) and add whatever extra elements you want. I added an image.
Image
Image

Step 4 - Add it to the subtitles Panel
Image

Step 5 - Create an empty game object, add an "empty actor" and select the panel number.
Image

Step 6 - Play with the positioning so it doesn't overlap your buttons or response menu
Image

Step 7 - Go to the conversation entry of your choice and type in [panel=4] (or whatever element you placed it in. for me it was 4 )
Image

Step 8 - remember to deactivate it on the next entry

Image


Image

Re: How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Sat Jan 20, 2024 4:30 pm
by Tony Li
Hi,

Good job! There are ways to simplify that. If you're interested in simplifying it, which might make it easier to implement your final question, do you want the other dialogue UI to be visible or invisible while the Thinking Panel is visible? I'll put together a short example scene.

Re: How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Sat Jan 20, 2024 5:21 pm
by need_verification
Tony Li wrote: Sat Jan 20, 2024 4:30 pm Hi,

Good job! There are ways to simplify that. If you're interested in simplifying it, which might make it easier to implement your final question, do you want the other dialogue UI to be visible or invisible while the Thinking Panel is visible? I'll put together a short example scene.
A simpler way would be fantastic! It's easy to get confused doing it like this.

It possible, "Default Dialogue Panel UI" to be invisible while "Thinking Dialogue Panel UI" is active ( still having the same button functions) however, the "Thinking Dialogue Panel UI Text Box" should be in the center of the panel.
While ""Default Dialogue Panel UI Text Box" should be to the top left of the panel.

Is there's a way to switch it's position of the "TextBox" depending on which one is active or maybe just adding a new textbox like I did before is easiest?

Re: How to change Dialogue Panel Based on Current Dialogue Entry?

Posted: Sat Jan 20, 2024 5:26 pm
by need_verification
Image