Page 2 of 3

Re: FMOD integration how to check if audio finished

Posted: Tue May 20, 2025 5:11 am
by Saper
Hi Tony

I checked it looks like the "OnSequenceEnd" is fired at the start and the end of FMODWait. In Sequence ther is only
FMODWait(Test_audio, event:/VO/event_vo_test);

Re: FMOD integration how to check if audio finished

Posted: Tue May 20, 2025 7:55 am
by Tony Li
Is it possible that the first OnSequenceEnd is coming from the previous dialogue entry?

Re: FMOD integration how to check if audio finished

Posted: Tue May 20, 2025 11:33 am
by Saper
After some tests. "OnSequenceEnd" fire at the start of the first node after "Start" node. When I use Jump to Specify Starting Entry ther is no problem and "OnSequenceEnd" fire at the end of sequence

Re: FMOD integration how to check if audio finished

Posted: Tue May 20, 2025 11:49 am
by Tony Li
I think it's firing at the end of the <START> node.

Re: FMOD integration how to check if audio finished

Posted: Wed May 21, 2025 4:57 am
by Saper
About <START> node, can i check node ID from code?

Other thing:

We have class that will auto progress dialogue when audio finishes, typewriter finish plus offset.
And to progress dialogue we use:
- DialogueManager.PlaySequence("Continue()"); <- and this doing second "OnSequenceEnd"
Can I call other class / method to continue dialogue ?

Re: FMOD integration how to check if audio finished

Posted: Wed May 21, 2025 7:59 am
by Tony Li
Hi,

To check a node ID, use DialogueManager.currentConversationState.subtitle.dialogueEntry.id

To continue a conversation to the next node, call DialogueManager.standardDialogueUI.OnContinueConversation().

Alternatively, you can advance after FMOD and timing by using a single sequence instead of C# code. Example:

Code: Select all

FMODWait(entrytag)->Message(AudioDone);
WaitForMessage(AudioDone, Typed)
(This assumes you're not requiring a continue button click.)

Or:

Code: Select all

FMODWait(entrytag)->Message(AudioDone);
WaitForMessage(AudioDone, Typed)->Message(Delay2Seconds);
Delay(2)@Message(Delay2Seconds)

Re: FMOD integration how to check if audio finished

Posted: Wed May 21, 2025 10:41 am
by Saper
Hi

We requiring a continue button click, DialogueManager.standardDialogueUI.OnContinueConversation() helped with other nodes. Now the problem with <Start> node still exists, when I try to get node ID OnSequenceStart or OnSequenceEnd it shows ID = 1

Same problem happening with response buttons. OnSequenceEnd from it starts when new node is visible

blank node with Continue(); don't do that

Re: FMOD integration how to check if audio finished

Posted: Wed May 21, 2025 11:41 am
by Tony Li
Alternatively, you could use a sequence like this:

Code: Select all

FMODWait(entrytag)->Message(AudioDone);
WaitForMessage(AudioDone, Typed)->Message(Delay2Seconds);
Delay(2)@Message->Message(ReadyToContinue);
Continue()@Message(ReadyToContinue)

Re: FMOD integration how to check if audio finished

Posted: Wed May 28, 2025 6:06 am
by Saper
Hi Tony

I found a solution, this what i did:
- I created new var in DS, type: bool , name: StartNode
- In Start node in sequence I change "StartNode" var to true
- In my script OnSequenceEnd i first check if "StartNode" true
- If it is true then change value of "StartNode" to false, and do nothing
- If "StartNode" value is false set audio as finished

Is there a option to set this sequence to all my Start Nodes without doing it per conversation?

Re: FMOD integration how to check if audio finished

Posted: Wed May 28, 2025 8:37 am
by Tony Li
Hi,

Try adding this method to a custom script on the Dialogue Manager GameObject:

Code: Select all

void OnConversationStart(Transform actor)
{
    PixelCrushers.DialogueSystem.DialogueLua.SetVariable("StartNode", true);
}