Audio on conversation lines

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
davegagne
Posts: 17
Joined: Mon Nov 22, 2021 10:26 pm

Audio on conversation lines

Post by davegagne »

Hi,

I was working on the integration of a typewriter-style SFX as subtitle text is being displayed in dialogues (text showing as if being typed).

Since we are using Wwise, I created a set of events to tackle this. One Wwise event would start a typewriter-style sequence to be played when a line is launched. So far so good. The problem I have is, when I'm trying to stop this sequence when a line is finished or canceled (read: skip to next line). The skip thing works, but not the Line End, even if they are the same (see attachment).
dialogue-audio.JPG
dialogue-audio.JPG (34.27 KiB) Viewed 374 times
Do I understand the Conversation Line End properly? Is it checking when a line is finished being displayed/typed? If that's not the case, is there any way to check when a text is finished being written?

Thanks a lot !

Dave
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Audio on conversation lines

Post by Tony Li »

Hi Dave,

Can you use the Dialogue System's built-in typewriter effect? It works for Unity UI Text or TextMesh Pro. If so, configure the typewriter effect's OnBegin() event to call your PostWwiseEvent.postWwiseEvent - DialogueTypewriter_Start, and configure the OnEnd() event to call the same with DialogueTypewriter_Stop.

If you can't do that, keep in mind that conversation events such as OnConversationLineEnd are only sent to the hierarchies of the Dialogue Manager GameObject and the two GameObjects that are used as the active conversation's actor and conversant. More info:
davegagne
Posts: 17
Joined: Mon Nov 22, 2021 10:26 pm

Re: Audio on conversation lines

Post by davegagne »

Hi Tony,

This works PERFECTLY. I was already using the Text Mesh Pro Typewriter component, so this was a super easy fix.

Again, thanks a bunch !

Dave
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Audio on conversation lines

Post by Tony Li »

Glad to help!
Post Reply