Bug with actor portraits showing the wrong one on player input

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
NotVeryProfessional
Posts: 142
Joined: Mon Nov 23, 2020 6:35 am

Bug with actor portraits showing the wrong one on player input

Post by NotVeryProfessional »

In some of my dialogues, the actor portraits are set wrongly. I'm using a template that always shows both, and it works perfectly most of the time. However, when the player can select an answer, it shows the player icon for both speakers. In this screenshot, "Agnes" (the NPC) has her own portrait, and whenever she has a dialog it shows up correctly, as well as when she is talking with another NPC. This only happens when the player has a dialog choice:
dialog.jpg
dialog.jpg (556.15 KiB) Viewed 383 times
I tried to figure out what's causing it, but couldn't.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bug with actor portraits showing the wrong one on player input

Post by Tony Li »

Hi,

Your dialogue UI probably has three Image components for portraits:
  • A subtitle panel portrait image on the left
  • A subtitle panel portrait image on the right
  • A response menu panel player image on one side or the other.
If you're already showing the player in one of the subtitle panels, the simplest solution is probably to delete the response menu panel's PC Image and PC Name.

If that's not what you want to do, let me know. We can look into actor mismatches.
NotVeryProfessional
Posts: 142
Joined: Mon Nov 23, 2020 6:35 am

Re: Bug with actor portraits showing the wrong one on player input

Post by NotVeryProfessional »

Finally found it. It wasn't this, but your answer put me on the right path.

The problem only appeared on response menus. Since my game always shows the speaker on the left and the listener on the right (using a simple script to update them in OnConversationLine) it actually changed the speaker portrait twice - once in OnConversationLine and once in the StandardUISubtitlePanel. Since this was always the same sprite, I never noticed.

But on responses, a different script is run - StandardUIMenuPanel - which also updates the speaker image, but since OnConversationLine isn't triggered for response menus, only the speaker and not the listener portrait was updated.

The fix was to simple set the "PC Image" field to none in StandardUIMenuPanel.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bug with actor portraits showing the wrong one on player input

Post by Tony Li »

Glad you found it!
Post Reply