So I’m on a school project with UE4 ans I work with a sound designer, and he wanted to use FMOD for everything in the game (sounds, dialogues etcetc).
I have big troubles with dialogues and FMOD.
Basically, I made a dialogue structure, with some parameters. http://prntscr.com/au6c1s
That way, I can play an FMOD event and write the subtitles.
The problem is, I can’t find a way to get an event in Blueprint when the sound is finished.
Is there a thing that can help me with that?
I’m also trying to get the length of the FMOD Event in order to manually trigger an “onEnd”, but i can’t find a way to get it neither… http://prntscr.com/au6aid
can you help me ?
I just need a way to know when an FMOD Event is finished or his length.
How is it possible to store and FMOD Event Instace Reference in blueprint? http://prntscr.com/au718w
I can’t promote to variable, I can’t find it in the variables types, I can’t do nothing with that…
We don’t have any blueprint events/callbacks hooked up for when a FMOD Event finishes, but there are a few ways you could do it.
If it is only a few cases and they have sounds on the timeline, then you could get your sound designer to place a named marker at the end of the timeline and hook that up to Blueprint, as described here:
Another way it just to check in Blueprint every frame if the sound has finished playing. For sounds playing via a FMOD Audio Component, there is a function FMODAudioComponent::IsPlaying which you can use.
Or if you use the “fire and forget” FMODEventInstance via the FMOD Blueprint functions (rather than audio components), then if you release the event instance, you can query if it has finished and been destroyed with the FMOD Blueprint function EventInstanceIsValid.
Note that FMOD’s API does support callbacks for when Events finish up, but we haven’t exposed that via our UE4 integration. If you wanted to dig into the UE4 integration and extend it, check out the UFMODAudioComponent_EventCallback function in the FMOD Audio component. The code there could receive a FMOD_STUDIO_EVENT_CALLBACK_STOPPED message, queue it back to the main thread and then broadcast it to Blueprint.
Please login first to submit.