How to Make FMODWait() not be interrupted

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
GarlandChaos
Posts: 18
Joined: Wed Aug 14, 2024 3:06 pm

How to Make FMODWait() not be interrupted

Post by GarlandChaos »

Hi!
I'm using FMOD for a project and by using the sequence command

Code: Select all

required FMODWait(Hub Seguro, event:/Musicas/Hub Seguro);
it plays the music, however it is interrupted as soon as the next dialogue node begins.
I need to start the music when a character talks and keep it playing until the end of the conversation, or switch to another music at a later dialogue line.
Also, is there a way to modify FMOD parameters in a built-in sequence?
And just for curiosity: I noticed if I omit the FMODWait() first parameter like

Code: Select all

required FMODWait(, event:/Musicas/Hub Seguro);
it still plays the music correctly, so what is the first parameter exactly?
User avatar
Tony Li
Posts: 22105
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to Make FMODWait() not be interrupted

Post by Tony Li »

Hi,

The first parameter to FMODWait() is an FMOD event name. The second parameter is an FMOD event path. Since you only specified the event path, FMODWait() played the event using the event path.

You can make a custom sequencer command to not wait. For example, duplicate the SequencerCommandFMODWait.cs script and name it SequencerCommandFMOD.cs. This will add a command FMOD() to the sequencer system. Then edit the duplicated script and remove the part in OnDestroy() that stops the event.
GarlandChaos
Posts: 18
Joined: Wed Aug 14, 2024 3:06 pm

Re: How to Make FMODWait() not be interrupted

Post by GarlandChaos »

It worked, thank you! :D
Since I'm not stopping the music anymore, I think I'll release and stop in a FMOD manager after the conversation finishes.
About changing parameters, I think I'll create a new sequencer command, unless there is a better built in way for doing this.
User avatar
Tony Li
Posts: 22105
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to Make FMODWait() not be interrupted

Post by Tony Li »

A new sequencer command is fine! The Dialogue System is designed to be customized to your preferences.
GarlandChaos
Posts: 18
Joined: Wed Aug 14, 2024 3:06 pm

Re: How to Make FMODWait() not be interrupted

Post by GarlandChaos »

I see, I'm getting the hang of it, thank you again for the help! :D
User avatar
Tony Li
Posts: 22105
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to Make FMODWait() not be interrupted

Post by Tony Li »

Glad to help!
Post Reply