PLAYING ENTIRE AUDIO FILES WHEN TRIGGERED

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
alexprenzlersound
Posts: 7
Joined: Tue Aug 20, 2024 4:17 am

PLAYING ENTIRE AUDIO FILES WHEN TRIGGERED

Post by alexprenzlersound »

Hello there, thankyou for your time and brain power!

We're using Pixel Crushers in Unity to trigger musical 'stings/one-shots' that last for about 10 seconds.

This works well, but when we click our 'next' tab in the unity build this cuts off the 'sting' already playing and starts playing the next 'sting'. I'd like the our 'stings' to play for their entire duration and play over the top of each other. Is that possible?

FYI we're using 'Conversations' tree under 'Dialogue', adding the sfx stings to 'Sequence'

Cheers! :)
User avatar
Tony Li
Posts: 21636
Joined: Thu Jul 18, 2013 1:27 pm

Re: PLAYING ENTIRE AUDIO FILES WHEN TRIGGERED

Post by Tony Li »

Hi,

Use the Audio() sequencer command instead of AudioWait().

By default, if you drag an audio clip into the Sequence field, it will add an AudioWait() command for it. Some options:

1. Manually change the Sequence field to Audio()

2. Or from the "+" dropdown menu to the right of the Sequence field select Audio Drag-n-Drop > Use Audio(). From then on, when you drag audio files into the Sequence field it will add Audio() commands.

3. Or use entrytags. In this case, you may be able to leave the Sequence fields blank and set the Dialogue Manager GameObject's Display Settings > Camera & Cutscene Settings > Default Sequence to something like:

Code: Select all

Delay({{end}});
Audio(entrytag)
Note that I added a Delay() command. If you're not requiring the player to click a continue button, then each dialogue entry Sequence's Audio() command will immediately start the audio and then end the sequence, which will cause the conversation to immediately advance to the next dialogue entry. You can either add a Delay() command like above, or if you require the player to click a continue button you don't need to worry about it since the dialogue entry will wait for the continue button click.
alexprenzlersound
Posts: 7
Joined: Tue Aug 20, 2024 4:17 am

Re: PLAYING ENTIRE AUDIO FILES WHEN TRIGGERED

Post by alexprenzlersound »

Hi Tony!

Just to clarify, the "issue" is that we'd like to have NODE_01 play its audio and then if the player clicks to skip to NODE_02 it plays its audio but doesn't cut off NODE_01's currently playing audio.

Would this require more than one audio source? If so, how would I set this up with the Pixel Crushers dialogue system?

Thanks!
:)
alexprenzlersound
Posts: 7
Joined: Tue Aug 20, 2024 4:17 am

Re: PLAYING ENTIRE AUDIO FILES WHEN TRIGGERED

Post by alexprenzlersound »

Whoops, just saw your reply on the other post!

So I should be using Audio(entryTag, ,oneshot)?
User avatar
Tony Li
Posts: 21636
Joined: Thu Jul 18, 2013 1:27 pm

Re: PLAYING ENTIRE AUDIO FILES WHEN TRIGGERED

Post by Tony Li »

Hi,

Yes, oneshot should do it.
Post Reply