[Solved] Multiple "Is Player" Actors and PC Name/Portrait in Response Menu

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
tomb
Posts: 8
Joined: Fri Sep 30, 2022 8:23 am

[Solved] Multiple "Is Player" Actors and PC Name/Portrait in Response Menu

Post by tomb »

Hi Tony, I am facing an issue in my project using a custom Dialogue UI template and slightly older version of Dialogue System.

To demonstrate and test I have set up a new blank project with the latest version of Dialogue System and the Basic Standard Dialogue UI template and am seeing the same behaviour.

I want multiple characters to be able to make choices in the Response Menu and have set "Is Player" as true on their Actors to achieve this. This is working and Responses appear in the Response Menu for the Actors.
Actor Setup.png
Actor Setup.png (58.64 KiB) Viewed 84 times
Dialogue Setup.png
Dialogue Setup.png (30.4 KiB) Viewed 84 times

The issue occurs when I add a Portrait Image and Portrait Name to the Response Menu - I always see the Image/Name of the "Player 1" Actor even if "Player 2" is assigned to those Responses in the Dialogue Editor.

To set up the Dialogue Manager to use an Image/Name in the Response Menu I made the following 3 changes.

1. Adjusted the Response Menu Panel, adding new GameObjects for a Portrait Image and Portrait Name and assigning them in its "Standard UI Menu Panel" component.
Response Menu Portrait and Name.png
Response Menu Portrait and Name.png (76.47 KiB) Viewed 84 times

2. In the Dialogue Manager prefab I changed the following values in the Dialogue System Controller's "Subtitle Settings":
  • Show NPC Subtitles With Responses: false
  • Show PC Subtitles During Line: true
  • Continue Button: "Always"
Subtitle Settings.png
Subtitle Settings.png (22.75 KiB) Viewed 84 times

3. Both the NPC and PC Subtitle Panel's "Standard UI Menu Panel" components have their visibility set to "Only during content" as I don't want to see those panels persist behind the Response Menu when the player is selecting Responses.
Panel Visibility.png
Panel Visibility.png (2.28 KiB) Viewed 84 times

The results are...

When "Player 1" is picking Responses it works exactly as I hoped, I see the Image and Name for "Player 1" in the Response Menu.
Player 1 Response Menu.png
Player 1 Response Menu.png (8.91 KiB) Viewed 84 times

When "Player 2" is picking Responses, I have the issue, the Image and Name for "Player 1" are displayed in the Response Menu. I want to see the Image and Name for "Player 2" instead.
Player 2 Response Menu.png
Player 2 Response Menu.png (9.13 KiB) Viewed 84 times

Please let me know if it is possible to achieve what I am hoping for with this type of setup. The Image/Name in the Response Menu will be in a different position compared too the Subtitle Panel so I don't think I can use a persisting Subtitle Panel alongside the Response Menu. If it is possible to have the Response Menu Panel update with the Image/Name for the current "Is Player" Actor that would be perfect, thank you.

In the meantime in the full project I have a functioning workaround but it seems like a messy setup (no need to comprehend this workaround if there is a solution to the above, I can work from that and adjust the full project accordingly). I created an Alternate Subtitle Panel and Alternate Response Menu Panel. The Alternate Subtitle Panel has no visible elements and its "Standard UI Menu Panel" component is set to update the Image/Name components in the Alternate Response Menu Panel. The Alternate Response Menu Panel does not have the Image/Name assigned and so doesn't override them. When I want to use the Response Menu with different Actors, I use Dialogue Actor components to assign the Alternate Panels for those Actors. Then in the conversation I use an extra Dialogue Entry with dummy text in Dialogue Text field (has to have content otherwise the Image/Name are not set?) and a Sequence of "Continue()@0.1" (can't "Continue" immediately otherwise the Image/Name are not set?) prior to branching out to the Dialogue Entries for the Responses. This adds the correct Image/Name to the Alternate Response Panel to achieve what I am wanting. The Alternate Subtitle Panel is never seen as even though it is active for a fraction of a second it has no visible elements.
Last edited by tomb on Mon Apr 29, 2024 10:44 am, edited 2 times in total.
User avatar
Tony Li
Posts: 20759
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple "Is Player" Actors and PC Name/Portrait in Response Menu

Post by Tony Li »

Hi,

Inspect your dialogue UI's Standard Dialogue UI component and tick Conversation UI Elements > Use First Response For Menu Portrait. This will look at the first response in the menu and use that actor's portrait.
tomb
Posts: 8
Joined: Fri Sep 30, 2022 8:23 am

Re: Multiple "Is Player" Actors and PC Name/Portrait in Response Menu

Post by tomb »

Amazing Tony! It works, it is perfect - thank you!

success.png
success.png (8.77 KiB) Viewed 69 times
User avatar
Tony Li
Posts: 20759
Joined: Thu Jul 18, 2013 1:27 pm

Re: [Solved] Multiple "Is Player" Actors and PC Name/Portrait in Response Menu

Post by Tony Li »

Glad to help!
Post Reply