Page 1 of 1

Play different audio clips for character and NPC

Posted: Tue Jan 30, 2024 6:31 am
by EmmaC
I am using the JRPG standard dialog template for a simple conversation (no choices) between player and NPC. I am trying to use 2 different sets of audio clips for the 2 characters via the unity UI typewriter effect. As the subtitle text is shared between the 2 characters I am not able to differentiate the 2 characters and can only use one set of audio clips for both. Could someone nudge me in the right direction to achieve this please? Thanks in advance

Re: Play different audio clips for character and NPC

Posted: Tue Jan 30, 2024 10:04 am
by Tony Li

Re: Play different audio clips for character and NPC

Posted: Thu Feb 01, 2024 8:40 am
by EmmaC
Thanks for the swift reply. How do I set the subtitle panel number?
Make a copy of the subtitle panel for each character, and assign them to the Standard Dialogue UI's list of subtitle panels. Add a Dialogue Actor component to each character, and select the subtitle panel number to use (e.g., 0 for male, 2 for female, etc.). Then customize that subtitle panel's typewriter effect.

Re: Play different audio clips for character and NPC

Posted: Thu Feb 01, 2024 9:20 am
by Tony Li
Hi,

You can use the [panel=#] markup tag in a dialogue entry's Dialogue Text, or use the SetPortrait() sequencer command in the Sequence field.

Re: Play different audio clips for character and NPC

Posted: Fri Feb 02, 2024 6:13 am
by EmmaC
Sorry Tony I still don't quite understand how to set a panel number. I am trying to use 2 subtitle panels so I can maintain different typewriter effects for player and NPC. At the moment, when the NPC starts the conversation, the player subtitles appear while NPC subtitles remain on screen. I am assuming this is because I have not set the subtitle panel numbers and therefore cannot refer to the correct subtitle panel number in the relevant dialog actor components.

Re: Play different audio clips for character and NPC

Posted: Fri Feb 02, 2024 8:14 am
by Tony Li
Hi,

Inspect your subtitle panels and set the Visibility dropdowns to Until Superceded. (Or Until Superceded Or Actor Change Or Response Menu.) When one subtitle (e.g., PC) starts playing, it will hide other panels that are set to Until Superceded (NPC).

Re: Play different audio clips for character and NPC

Posted: Fri Feb 02, 2024 8:23 am
by EmmaC
That solved my problem! Thank you so much!

Re: Play different audio clips for character and NPC

Posted: Fri Feb 02, 2024 8:54 am
by Tony Li
Glad to help!