Stop portrait 'hiding' and display active talker

Announcements, support questions, and discussion for the Dialogue System.
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Stop portrait 'hiding' and display active talker

Post by mac »

Hey Tony, so I'm trying to achieve a kind of realistic 'first-person' dialogue setup, where the character that you are conversating with stays in the middle of the screen in a somewhat big proportion and the player never shows up as the dialogues basically happens at his POV (you can see it on the example image attached).
For that I used the VN template, and adjusted the portrait positions accordingly, that's all i've done for now.

From what I understood, if theres no portrait specified for the player, the conversant portrait will still show up, but it gets toned down.
I couldn't figure out is how to stop that from happening (aka the character sprite getting black tinted when the player is talking or choosing an answer like you can see in the screenshot);
And also how can I make sure the name of the active conversant is shown on the left, unrelated to their portrait pictures like it is set by default? (also shown in the example image).

Thanks in advance! Hope you are off to a great start with 2021!
Attachments
example.png
example.png (327.84 KiB) Viewed 1116 times
Screenshot_1.png
Screenshot_1.png (443.88 KiB) Viewed 1116 times
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Stop portrait 'hiding' and display active talker

Post by Tony Li »

Hi,

Change your dialogue UI's animator settings so it doesn't play focus and unfocus animations. The steps will vary slightly depending on which dialogue UI prefab you're using. The easiest is probably to duplicate the NPC subtitle panel's animator controller asset. In the duplicate, remove the Unfocus state. Assign the duplicate to the subtitle panel's Animator component. Clear the Standard UI Subtitle Panel component's Unfocus Animation Trigger field. You can also remove the elements from the OnOpen(), OnFocus(), and OnUnfocus() UnityEvents that control the Portrait Name GameObject.

Then inspect the player's subtitle panel and remove the Portrait Name and Portrait Image GameObjects. If the response menu panel has Portrait Name and Portrait Image GameObjects, remove those, too.
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Stop portrait 'hiding' and display active talker

Post by mac »

Thank you Tony, now the character doesn't unfocus anymore, but for some reason, when the character is talking, his Portrait Name gameobject is deactivated (shown on screenshot, also the Player character does display its name when talking only the NPC character doesn't), any ideas why? Is there any place that I can manually 'rewire' the Portrait Name to show up again when a character is talking? (I'm using the VN Template, if that helps.)
Attachments
Screenshot_2.png
Screenshot_2.png (122.92 KiB) Viewed 1109 times
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Stop portrait 'hiding' and display active talker

Post by Tony Li »

Hi,

Check the subtitle panel's OnOpen/OnClose/OnFocus/OnUnfocus UnityEvents.

The basic VN template sets Portrait Name active and inactive. Since you're not using focus triggers, you can probably just remove those events.
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Stop portrait 'hiding' and display active talker

Post by mac »

Sorry for not specifying, but the events were already emptied, the result stood the same :/
Attachments
Screenshot_2.png
Screenshot_2.png (165.01 KiB) Viewed 1104 times
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Stop portrait 'hiding' and display active talker

Post by Tony Li »

Hi,

Please try the animation patch in this post. The animator for the VN template had an issue.
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Stop portrait 'hiding' and display active talker

Post by mac »

Thank you Tony, the patch worked, now the portrait name displays correctly when starting the dialogue, but how can I hide it when the player is choosing a reply/ replying? What currently happens is that both names overlap like you can see in the screenshot
Attachments
Screenshot_2.png
Screenshot_2.png (408.37 KiB) Viewed 1097 times
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Stop portrait 'hiding' and display active talker

Post by Tony Li »

Hi,

Try configuring the subtitle panel's OnFocus() UnityEvent to activate the panel's Portrait Name GameObject and OnUnfocus() to deactivate Portrait Name.
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Stop portrait 'hiding' and display active talker

Post by mac »

I Already tried that before, it didn't work and I imagine thats because on previous steps in order to prevent the portrait image from unfocusing we cleared the 'Unfocus Animation Trigger' field, right?
Assuming that this is the case, I readded the 'Unfocus' trigger, now the character name went away correctly but the portrait is back to unfocusing also, so it looks what we would have to do is separate the portrait image unfocus animation from the portrait name unfocus animation I guess?
Attachments
Screenshot_2.png
Screenshot_2.png (192.75 KiB) Viewed 1096 times
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Stop portrait 'hiding' and display active talker

Post by mac »

Or maybe you could add an extra bool like "Unfocus Only Name", tooltip description: " If checked, unfocusing will only affect the Potrait Name, not hiding the Portrait Image". In cases like this where you don't want to unfocus the portrait image but still want to hide the character name when he is not talking?
Post Reply