How to stop AudioWait?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
rakkar
Posts: 51
Joined: Mon Jan 13, 2020 10:39 pm

How to stop AudioWait?

Post by rakkar »

If the user clicks past the last entry of dialogue, the narrative audio started from AudioWait continues playing into loading screens and elsewhere. If I leave the current dialogue whatever sequences or audio that were in progress should be interrupted. How would I do that?
User avatar
Tony Li
Posts: 20751
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to stop AudioWait?

Post by Tony Li »

AudioWait() should stop as soon as the dialogue entry stops . Are you perhaps using Audio()? It kicks off audio and lets it play uninterrupted.
rakkar
Posts: 51
Joined: Mon Jan 13, 2020 10:39 pm

How to setup standard narration behavior

Post by rakkar »

I'm looking for the standard behavior virtually every game does for narration. It reads the text on the screen, does not read text not on the screen, reads all lines in sequence, stops reading once all lines are read, and the user can always skip the text. If I have multiple speakers in the same sequence, each speaker speaks in turn.

AudioWait() blocks the continue button from showing up until the audio is done.
Audio() keeps playing into the next sequence, if the next sequence doesn't have audio.

Seems like neither does quite what I want, any help is appreciated.

Also, is this how you play in sequence using Audio()?
Audio(Narration[lua(GetAvatarGender(true))]_Mission1_Part2_MissionEndConversation_03)->Message(Audio1Done); Audio(Prisoner_Mission1_Part2_MissionEndConversation_03)@Message(Audio1Done)
User avatar
Tony Li
Posts: 20751
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to stop AudioWait?

Post by Tony Li »

Hi,

Each line of dialogue should correspond to a dialogue entry, which is a common standard. Each dialogue entry is assigned to a single speaker and should have a single AudioWait(). See DemoScene1 for an example. The dialogue entries' Sequence fields are blank (with a few exceptions), which means they use the Dialogue Manager's Default Sequence, which is:

Code: Select all

AudioWait(entrytag)
Technically it's:

Code: Select all

AudioWait(entrytag); Delay({{end}})
but this is just so the timing will still be good if the user decides to delete the demo's audio files.

Tip: Normally when you add a new dialogue entry, it alternates between the conversation's actor and conversant (e.g., player and NPC). If you want to create a another dialogue entry using the same speaker, hold down Shift when right-clicking on the original dialogue entry to open the context menu. Then select Create Child Node from the context menu.
rakkar
Posts: 51
Joined: Mon Jan 13, 2020 10:39 pm

Re: How to stop AudioWait?

Post by rakkar »

Thanks for the response. I claimed "AudioWait() blocks the continue button from showing up until the audio is done." It happens consistently each time I run.

Are you saying that it is not supposed to block the continue button?
rakkar
Posts: 51
Joined: Mon Jan 13, 2020 10:39 pm

Re: How to stop AudioWait?

Post by rakkar »

In case your answer is "Yes it is supposed to block" how would I achieve this?

Read text on the screen
Do not read text not on the screen
Stop reading when all lines are read
User can ALWAYS skip the text

Your comment "Each line of dialogue should correspond to a dialogue entry" which I don't believe addresses my concern. All I need is to play a series of sounds in order in a single entry, and the sounds stop when I leave the entry. This didn't seem to work

Code: Select all

Audio(Narration[lua(GetAvatarGender(true))]_Mission1_Part2_MissionEndConversation_03)->Message(Audio1Done); Audio(Prisoner_Mission1_Part2_MissionEndConversation_03)@Message(Audio1Done)
rakkar
Posts: 51
Joined: Mon Jan 13, 2020 10:39 pm

Re: How to stop AudioWait?

Post by rakkar »

In case this helps anyone else, the answer is:

1. To play a series of sounds in sequence, use AudioWait with (file1, null, file2, file3, ...)
2. To always let the player continue, select in Dialogue System Controller, under Subtitle Settings, Continue Button "Optional Before Response Menu"
User avatar
Tony Li
Posts: 20751
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to stop AudioWait?

Post by Tony Li »

Setting the Continue Button dropdown to Always didn't work for you?
duolazhang
Posts: 10
Joined: Fri Oct 06, 2023 10:54 am

Re: How to stop AudioWait?

Post by duolazhang »

rakkar wrote: Fri Sep 04, 2020 8:30 am In case this helps anyone else, the answer is:

1. To play a series of sounds in sequence, use AudioWait with (file1, null, file2, file3, ...)
2. To always let the player continue, select in Dialogue System Controller, under Subtitle Settings, Continue Button "Optional Before Response Menu"
Just came to say thank you!
Post Reply