Custom behaviour for narrator

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Keeko
Posts: 33
Joined: Mon Feb 01, 2021 8:08 pm

Custom behaviour for narrator

Post by Keeko »

I have a character in my dialogue database that represents narrated actions. However I have a few problems.

firstly, the narrators name "Scene Action" appears in my dialogue box, and I only want this to happen for actual characters, i'd also like to style the text in italics for this character. Secondly, it causes the current characters on screen to vanish. Ideally i'd like both characters to darken whilst a scene action is playing:

here is an image showing the issue:

https://imgur.com/a/dhpD1ic
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom behaviour for narrator

Post by Tony Li »

Hi,

Add a separate subtitle panel for the narrator. It can use the same text element as your other subtitle panels. Do not add a Portrait Image or Portrait Name to the subtitle panel, and keep Set Visibility to Until Superceded.

Tick the Standard UI Subtitle Panel's Add Speaker Name, but change the Add Speaker Name Format to:

<i>{1}</i>

This will omit the speaker name and show the text in italics.

Then add a GameObject for your narrator. It can be an empty GameObject. When doing this, designers often make this GameObject a child of the Dialogue Manager so it carries across scenes. Add a Dialogue Actor component, and set it to your Scene Action actor. Set Dialogue UI Settings > Subtitle Panel to the panel number of your new subtitle panel.
Keeko
Posts: 33
Joined: Mon Feb 01, 2021 8:08 pm

Re: Custom behaviour for narrator

Post by Keeko »

You're a legend! that works great. There seems to be a slightly longer pause than usual when pressing continue after the scene action narrator has a line, is there a common reason you can think of like a setting or such for this, or is this most likely just something in my code somewhere causing this? (which I can go investigate myself)
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom behaviour for narrator

Post by Tony Li »

It could be waiting for the panel's unfocus or hide animations? Or maybe something in your code?
Keeko
Posts: 33
Joined: Mon Feb 01, 2021 8:08 pm

Re: Custom behaviour for narrator

Post by Keeko »

I'll have a look at these settings,

It seems that the prescence of the narrator actor object is causing some strange behaviour. With it turned off, if i click slip and it takes me to the first group of questions, the question being asked and the options are presented as normal.

If its turned on, it skips to the correct question, but then the question is rewritten with a dialogue entry from before the set of answers from the narrator?
Keeko
Posts: 33
Joined: Mon Feb 01, 2021 8:08 pm

Re: Custom behaviour for narrator

Post by Keeko »

Actually it looks like the animation triggers on that second subtitle panel were causing both of these issues for some reason. So removing the animation trigger references seems to have fixed this.
Post Reply