Page 1 of 1

How to Make FMODWait() not be interrupted

Posted: Fri Oct 11, 2024 2:39 pm
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?

Re: How to Make FMODWait() not be interrupted

Posted: Fri Oct 11, 2024 2:53 pm
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.

Re: How to Make FMODWait() not be interrupted

Posted: Fri Oct 11, 2024 3:14 pm
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.

Re: How to Make FMODWait() not be interrupted

Posted: Fri Oct 11, 2024 3:27 pm
by Tony Li
A new sequencer command is fine! The Dialogue System is designed to be customized to your preferences.

Re: How to Make FMODWait() not be interrupted

Posted: Fri Oct 11, 2024 3:31 pm
by GarlandChaos
I see, I'm getting the hang of it, thank you again for the help! :D

Re: How to Make FMODWait() not be interrupted

Posted: Fri Oct 11, 2024 4:12 pm
by Tony Li
Glad to help!