Knowing when a Loop region is over

Hello, I have a single track that has a paramter and a looping region. I would like to keep looping the region for some time. Once that time is over I change the parameter to transition towards the next part of the track. Everything’s working except that I don’t know how to get that the looping region ended. I want to trigger an animation after the looping ends but I can’t find a way to get that information.

If I understand correctly, when the time is over, the parameter switch deactivates the loop, so the playback can follow through the next part (but without jump-transitioning). And you want to know when the looping part is finished.

I think the way to go is to put a marker just after the looping region, and set a callback in your game code. Use FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER

Another method (less clean!) is to put a command instrument just after the looping region, to set a specific parameter to a specific value, and loop/check this parameter value in your game code.

Or also, you can loop/check the timeline position with get timeline position.

Hello, Thank you for your quick response. This seems to be exactly what I was looking for. I’m gonna do some research to use the callback event.

I was using the timeline position but thought that was kinda bad. Glad to know I can do it with a callback.