FMOD integration how to check if audio finished
FMOD integration how to check if audio finished
Hi Tony
I want to check if audio was finished. To play audio i use sequence: FMODWait(AudioName, EventProgramerIntrument);
I want to check if audio was finished. To play audio i use sequence: FMODWait(AudioName, EventProgramerIntrument);
Re: FMOD integration how to check if audio finished
Hi,
You can use regular sequencer messages. For example, to play two FMOD events one after the other:
Or to activate GameObject when the FMOD event is done:
You can use regular sequencer messages. For example, to play two FMOD events one after the other:
Code: Select all
FMODWait(firstEvent)->Message(FirstDone);
FMODWait(secondEvent)@Message(FirstDone)
Code: Select all
FMODWait(firstEvent)->Message(Done);
SetActive(SomeGameObject)@Message(Done)
Re: FMOD integration how to check if audio finished
Hi Tony
Is there a posibility to setup something outside dialogue system outside SetActive object?
Is there a posibility to setup something outside dialogue system outside SetActive object?
Re: FMOD integration how to check if audio finished
Sure, you can do anything. That was just an example to demonstrate how to know when FMODWait() is done. What do you want to do?
Re: FMOD integration how to check if audio finished
Hi Tony
I want to change variable in one of ours classes
I want to change variable in one of ours classes
Re: FMOD integration how to check if audio finished
Hi,
If you write a C# method to access your variables, you can register it with Lua to call that method in your conversations.
More info: How To: Connect C# Variables to Dialogue System's Lua
If you write a C# method to access your variables, you can register it with Lua to call that method in your conversations.
More info: How To: Connect C# Variables to Dialogue System's Lua
Re: FMOD integration how to check if audio finished
After I register my metod, sequence should looks like this?:
Code: Select all
FMODWait(firstEvent)->Message(Done);
MyMetod() @Message(Done)
Re: FMOD integration how to check if audio finished
Hi,
If you want to change a variable from within a sequence, don't register your C# method with Lua. (In other words, don't use the instructions I provided in the link above.) Instead, write a custom sequencer command.
Use Lua functions in Conditions and Script fields. Use sequencer commands in Sequence fields.
Example sequencer command:
Example use:
If you want to change a variable from within a sequence, don't register your C# method with Lua. (In other words, don't use the instructions I provided in the link above.) Instead, write a custom sequencer command.
Use Lua functions in Conditions and Script fields. Use sequencer commands in Sequence fields.
Example sequencer command:
Code: Select all
public class SequencerCommandMyMethod : SequencerCommand
{
void Awake()
{
MyClass.Instance.Variable = GetParameterAsInt(0);
Stop();
}
}
Code: Select all
FMODWait(firstEvent)->Message(Done);
MyMethod(42)@Message(Done)
Re: FMOD integration how to check if audio finished
Hi Tony
Our class is on object, and before the FMOD we used "OnSequenceEnd" for check "if audio finished", with FMOD this don't work by using "OnSequenceEnd" it almost at start set the var to true
Our class is on object, and before the FMOD we used "OnSequenceEnd" for check "if audio finished", with FMOD this don't work by using "OnSequenceEnd" it almost at start set the var to true
Re: FMOD integration how to check if audio finished
Hi,
If the sequence uses FMODWait(), it should wait until the FMOD event is done before sending the OnSequenceEnd message.
Maybe some other sequence (e.g., some other dialogue entry) is sending OnSequenceEnd.
Can you use the "->Message(Done)" syntax I suggested above?
If the sequence uses FMODWait(), it should wait until the FMOD event is done before sending the OnSequenceEnd message.
Maybe some other sequence (e.g., some other dialogue entry) is sending OnSequenceEnd.
Can you use the "->Message(Done)" syntax I suggested above?