Image meant to be shown when character speaking is not working

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Image meant to be shown when character speaking is not working

Post by soniclinkerman »

During a conversation, the character that is meant to be talking to the other character isn't visible. The gameobject is off and the image hasn't been assigned. I set both of the default images in the "actors" section of the DB and can't figure out what's wrong.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Image meant to be shown when character speaking is not working

Post by Tony Li »

Hi,

Do you mean the Portrait Image, like in this example?

vnPortraits.png
vnPortraits.png (145.38 KiB) Viewed 424 times

If so, inspect the subtitle panel that the character will use. Set its Visibility dropdown to Always From Start:

alwaysFromStart.png
alwaysFromStart.png (80.73 KiB) Viewed 424 times

Generally speaking, if the character is an NPC (Is Player is UNticked), it will use panel 0. If the character is a PC (Is Player is ticked), it will use panel 1. More info: Character GameObject Assignments

If you want a character to use a different panel, add a Dialogue Actor component to the GameObject that represents the character (the character in your scene, not the dialogue UI portrait). Set its Standard Dialogue UI Settings > Subtitle Panel Number.
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: Image meant to be shown when character speaking is not working

Post by soniclinkerman »

Hey!

So I changed the panels for each character
NPC.png
NPC.png (113.45 KiB) Viewed 422 times
Player.png
Player.png (87.66 KiB) Viewed 422 times
I then made sure both of these Panels are Visible from Start, but when the "Carton" talks, he becomes hidden.
Scene 1.png
Scene 1.png (382.55 KiB) Viewed 422 times
Scene 2.png
Scene 2.png (369.54 KiB) Viewed 422 times
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: Image meant to be shown when character speaking is not working

Post by soniclinkerman »

Here's another pic showing how the canvas image just turns off when it's their turn to talk
Portrait off .png
Portrait off .png (967.46 KiB) Viewed 422 times
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Image meant to be shown when character speaking is not working

Post by Tony Li »

Hi,

I see that there are some warnings in the Console about SetPortrait(). Would you please post those errors here?

Also, please check the subtitle panels' OnOpen(), OnClose(), and OnFocus() events. They may be related to this issue.
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: Image meant to be shown when character speaking is not working

Post by soniclinkerman »

Hey!

Here are the console errors,

I will check those event listeners now
Errors.png
Errors.png (758.4 KiB) Viewed 420 times
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: Image meant to be shown when character speaking is not working

Post by soniclinkerman »

*Update*

I just saw the error and got it working.

I don't know how I missed that haha. Thank you for your help
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Image meant to be shown when character speaking is not working

Post by Tony Li »

Happy to help. Glad you got it working!
Post Reply