Leave player portrait during response menu?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Scroogi
Posts: 7
Joined: Thu Dec 31, 2020 12:30 pm

Leave player portrait during response menu?

Post by Scroogi »

Hi Tony! I've been looking for this solution for a while, but I can't seem to figure out what I'm missing. I'd appreciate any help you can give!

In my conversation, the player character is talking with an NPC back and forth. Sometimes, a response menu will let the player choose what direction they want the PC to talk the conversation. However, I am having trouble getting the response menu to line up exactly with the subtitle portraits, so you can tell that there are two menus stacked on top of one another. Additionally, the response menu doesn't keep the same portrait as the subtitle panel which means I have to put in the info twice. To work around this, I disconnected the response menu portrait and name from the response menu panel. However, because I'm using the VN template, the character portrait doesn't have "focus" while the response menu is up.

1) How can I give the PC subtitle panel focus during the response menu?
2) Can I change the PC subtitle portrait while the response menu is showing?
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Leave player portrait during response menu?

Post by Tony Li »

Hi,

The easiest solution might be to get the portrait images to line up. If you're having trouble adjusting the Unity UI layout to get that working, feel free send a reproduction project to tony (at) pixelcrushers.com.

Alternatively, you can configure the Response Menu Panel and Subtitle Panel 1 to share the same portrait image using these steps:
  • Remove the Response Menu Panel's Portrait Image and Portrait Name.
  • Assign Subtitle Panel 1's Portrait Image and Portrait Name to the Response Menu Panel.
  • Configure the Response Menu Panel's OnContentChanged() UnityEvent to call Subtitle Panel 1's Animator.SetTrigger, and set the string value to Focus.
In what way do you want to change the portrait?
Scroogi
Posts: 7
Joined: Thu Dec 31, 2020 12:30 pm

Re: Leave player portrait during response menu?

Post by Scroogi »

Hi Tony,
Wow!! Thank you so much for the quick reply. The problem is fixed!

I am changing the character sprite based on the current emotion, so if the "sad" image was currently displayed, the response menu didn't know that and would display the "neutral" image. I unlinked the response menu portrait and name and deactivated them in the inspector so they wouldn't pop up. Then I changed OnOpen and OnClose in the response menu to set the Subtitle Panel 1 Animator.SetTrigger to Focus and Unfocus respectively. It works perfectly!


Thank you always for your help :)
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Leave player portrait during response menu?

Post by Tony Li »

Glad to help!
Post Reply