AudioWait - Make the dialogue advance manually after the audio sequence is finished?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
RX-310
Posts: 22
Joined: Tue Jan 21, 2020 7:50 pm

AudioWait - Make the dialogue advance manually after the audio sequence is finished?

Post by RX-310 »

Currently AudioWait automatically advances through the conversation once the voice is finished playing. Is there any way to make it manual, since the dialogue script doesn't fire up when the conversation advances automatically?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: AudioWait - Make the dialogue advance manually after the audio sequence is finished?

Post by Tony Li »

Hi,

Which dialogue script are you referring to? If you're referring to the Script field on the dialogue entry node, it should run before AudioWait(). Take this node for example:

dialogueScript.png
dialogueScript.png (4.89 KiB) Viewed 643 times

This will happen in order:

1. The Script field executes.

Code: Select all

Variable["Said_Hello"] = true
2. The Dialogue System raises the OnConversationLine event to any relevant scripts or Dialogue System Events components.

3. The subtitle panel shows "Hello world."

4. The Sequence plays: AudioWait(hello)

5. The conversation waits until the Sequence is done -- which is when the AudioWait() command finishes in this case. Then it advances to the next stage in the conversation (e.g., next subtitle or response menu).
RX-310
Posts: 22
Joined: Tue Jan 21, 2020 7:50 pm

Re: AudioWait - Make the dialogue advance manually after the audio sequence is finished?

Post by RX-310 »

Tony Li wrote: Wed Jan 29, 2020 8:08 am If you're referring to the Script field on the dialogue entry node, it should run before AudioWait(). Take this node for example:
Yeah, it's Dialogue node's script field. But apparently it doesn't run before AudioWait() starts. For example, when I put AudioWait sequencer and a script to animate a sprite in the same dialogue node, the animate sprite script doesn't play - just the dialogue audio.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: AudioWait - Make the dialogue advance manually after the audio sequence is finished?

Post by Tony Li »

RX-310 wrote: Tue Feb 04, 2020 12:36 amYeah, it's Dialogue node's script field. But apparently it doesn't run before AudioWait() starts. For example, when I put AudioWait sequencer and a script to animate a sprite in the same dialogue node, the animate sprite script doesn't play - just the dialogue audio.
Is the animation in the Script field or Sequence field? Can you please post a screenshot of the inspector view of the node?

If you're calling a custom Lua function in the Script field, try adding a Debug.Log line to make sure the function is actually getting called when you expect it to.
Post Reply