Page 1 of 1

Choosing UI Panels

Posted: Tue Jun 12, 2018 9:18 am
by Alatriste
Hi Tony,

I'm trying to understand the new UI system and I noticed that many UI prefabs now have NPC and PC panel (1, 2, 3...) How can you select which panel to use when you have multiple actors in your conversation?

For example, I have a conversation among 3 characters. Sometimes I want to switch the position of the portrait of the characters, so it gives more a feeling of a live conversation, but I don't know how to switch panels during runtime.

Re: Choosing UI Panels

Posted: Tue Jun 12, 2018 11:11 am
by Tony Li
Hi,

Currently you select the panel at design time in the character's DialogueActor component. For example, the player always uses panel 1, NPC Adam always uses panel 2, NPC Bob always uses panel 3, etc.

In 2.0.1, I was planning to add an option to tell the DialogueActor to use the first unused panel. So if there's a conversation between the player and Bob, the player would take panel 1 and Bob would take panel 2. But if there's a conversation between the player, Adam, and Bob, then the player would take panel 1, Adam would take panel 2, and Bob would take panel 3.

You can use a script to change a DialogueActor's panel number, but the change will take effect in the next conversation, not in the middle of an active conversation.

Let's say player = panel 1, Adam = panel 2, Bob = panel 3. As an example, do you want to change to Adam = panel 3 and Bob = panel 2 in the middle of the conversation?

Re: Choosing UI Panels

Posted: Tue Jun 12, 2018 12:44 pm
by Alatriste
Let's say player = panel 1, Adam = panel 2, Bob = panel 3. As an example, do you want to change to Adam = panel 3 and Bob = panel 2 in the middle of the conversation?
Yes. That way I can simulate actor movements depending on who is talking. Adam can start in panel 1 and Bob in panel 3, but then player joins and takes panel 1, so then I move Adam to panel 2.

Overall you can make the dialogue much more dynamic.

Re: Choosing UI Panels

Posted: Tue Jun 12, 2018 2:44 pm
by Tony Li
Got it. I'll experiment with the best way to implement this in 2.0.1. Off the top of my head, I'm thinking a [panel=#] tag in the Dialogue Text, similar to the [pic=#] markup tag.

Re: Choosing UI Panels

Posted: Tue Jun 12, 2018 4:09 pm
by Alatriste
Sounds great! :)

I think it would be useful also to change the orientation of the character. (but if this is too much, the workaround would be to create another version of the portrait flipped.)