Multiple Visible Panels
-
- Posts: 15
- Joined: Sun Dec 26, 2021 9:30 pm
Multiple Visible Panels
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)
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
Hi,
Yes - use SetPanel(). The [panel=#] tag only applies its panel number override to a single dialogue entry node.
Yes - use SetPanel(). The [panel=#] tag only applies its panel number override to a single dialogue entry node.
-
- Posts: 15
- Joined: Sun Dec 26, 2021 9:30 pm
Re: Multiple Visible Panels
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.
Example
NPC 1: Hello. {Animaton(NPC 2, Show)}
Player: Hi.
NPC 2: Here I am.
Re: Multiple Visible Panels
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.
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.
-
- Posts: 15
- Joined: Sun Dec 26, 2021 9:30 pm
Re: Multiple Visible Panels
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.
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.
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.
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.
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.
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
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:
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);
-
- Posts: 15
- Joined: Sun Dec 26, 2021 9:30 pm
Re: Multiple Visible Panels
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.
Re: Multiple Visible Panels
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.
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.
-
- Posts: 15
- Joined: Sun Dec 26, 2021 9:30 pm
Re: Multiple Visible Panels
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!
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!