Page 1 of 1

Bug with actor portraits showing the wrong one on player input

Posted: Wed Aug 23, 2023 1:11 am
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 382 times
I tried to figure out what's causing it, but couldn't.

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

Posted: Wed Aug 23, 2023 9:24 am
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.

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

Posted: Sat Sep 23, 2023 3:49 am
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.

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

Posted: Sat Sep 23, 2023 9:11 am
by Tony Li
Glad you found it!