Page 1 of 2
Multiple Visible Panels
Posted: Wed May 18, 2022 7:11 pm
by marthmarth
Dumb question, but I can't find the setting for the automatic panel progression.
I've done some pretty heavy UI modification, and I have 2 problems:
1) Incoming NPCs replace the Last NPC that spoke, despite 'Always Once Shown' being ticked. There are 4 other Dialogue panels available for them to fill into. I've somehow made this overflow option disappear. All the panels are loaded into 'Subtitle Panels' in the Standard UI interface. (The way it works in the 'Captain-Pilot-Psion' demo is what it used to be, where the characters stay instead of being replaced)
2) When I specify specific panels with [panel=#] when the character enters, I can make multiple NPC panels show, but if I don't continue that panel tag in the node the next time the NPC speaks, the conversation breaks. It doesn't hold on to the last called panel for that character. Would using SetPanel instead of [panel] fix that, or do I just need to specify each time if I want to use those codes?
Example
Player: Hi
NPC 1: Hi [panel=1]
NPC 2: Hello [panel=2]
NPC 1: Ok. //no panel indicated//
*BREAK*
(I could set a default panel for each character using the Dialogue Actor component, but the position will change per conversation)
Re: Multiple Visible Panels
Posted: Wed May 18, 2022 8:08 pm
by Tony Li
Hi,
Yes - use SetPanel(). The [panel=#] tag only applies its panel number override to a single dialogue entry node.
Re: Multiple Visible Panels
Posted: Thu May 19, 2022 6:45 pm
by marthmarth
In that case, would Animation(Character, Show) be the way to show a NPC before they officially talk, while another NPC is talking? I got the show from the Pixel Crushers Animator folder for portrait things.
Example
NPC 1: Hello. {Animaton(NPC 2, Show)}
Player: Hi.
NPC 2: Here I am.
Re: Multiple Visible Panels
Posted: Thu May 19, 2022 7:25 pm
by Tony Li
Hi,
The best way to show an NPC before they actually talk is to set their Dialogue Actor component's Subtitle Panel Number to a subtitle panel whose Visibility is set to Always From Start.
Re: Multiple Visible Panels
Posted: Sun May 22, 2022 4:14 pm
by marthmarth
Thanks for the help!
I think I have that sorted, but I suppose my next question goes back to the animations.
In this Example Scene, the Animations are created on the Subtitle Panel game object.
- Ani2.PNG (359.81 KiB) Viewed 562 times
But in this wizard Example Scene the Animations seem to be created/linked somewhere else, but I can't figure out where, even with the documentation. My preference is this method, because it seems to allow various characters to play their animation in whatever Subtitle Panel as needed, even without the Subtitle Panel actually holding the animation, as it does in the example above.
- Ani1.PNG (231.89 KiB) Viewed 562 times
So I think my question is what GameObject is holding the animations? It doesn't seem to be the Subtitle Panel or the Actor object.
Re: Multiple Visible Panels
Posted: Sun May 22, 2022 7:40 pm
by Tony Li
Hi,
In both cases, what's important is that each character has a Dialogue Actor component whose Portrait Animator Controller points to an animator controller asset.
That animator controller asset should be configured to animate an Image in a subtitle panel's Portrait Image element. I recommend giving all Portrait Images the same name (e.g., "Portrait Image") so a character's animations can work on any of them.
If you need to change animations -- for example, to play a state named "Smile" instead of the default animator state -- use the "speakerportrait" keyword to refer to the Portrait Image, such as:
Code: Select all
AnimatorPlay(Smile, speakerportrait);
Re: Multiple Visible Panels
Posted: Sun May 22, 2022 8:08 pm
by marthmarth
So were these animations not created in the engine? They seem to be non-editable, and without clicking the game object it doesn't seem to be possible to create more.
- Ani3.PNG (113.07 KiB) Viewed 558 times
Re: Multiple Visible Panels
Posted: Sun May 22, 2022 8:37 pm
by Tony Li
I made those in the Unity editor's Animation window. To make them, I used these steps:
1. In the Hierarchy, inspected a Portrait Image.
2. Assigned an animator controller such as GreenAnimator to the Portrait Image's Animator component.
3. In the Animation window, created a new animation. This automatically adds the animation to the animator controller, too.
Re: Multiple Visible Panels
Posted: Mon May 23, 2022 11:31 am
by marthmarth
Ahhh, I finally get it.
The Portrait has to be inspected with the Animator attached to create the animations, and can then be removed from the portrait animator afterwards without corrupting the animations.
I was able to create a new character with new animations in the manner you listed, and manipulate as needed.
Thank you so much for the patience!
- Ani4.PNG (69.76 KiB) Viewed 553 times
Re: Multiple Visible Panels
Posted: Mon May 23, 2022 11:43 am
by Tony Li
Glad to help!