Page 1 of 1

Custom behaviour for narrator

Posted: Thu Oct 12, 2023 10:25 pm
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

Re: Custom behaviour for narrator

Posted: Fri Oct 13, 2023 8:01 am
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.

Re: Custom behaviour for narrator

Posted: Fri Oct 13, 2023 11:34 am
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)

Re: Custom behaviour for narrator

Posted: Fri Oct 13, 2023 12:56 pm
by Tony Li
It could be waiting for the panel's unfocus or hide animations? Or maybe something in your code?

Re: Custom behaviour for narrator

Posted: Fri Oct 13, 2023 1:03 pm
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?

Re: Custom behaviour for narrator

Posted: Fri Oct 13, 2023 1:08 pm
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.