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.

Hello,
This is a follow up on the same question I have. I wanted to know if Fmod has a callback to know when a loop region is over.
The reason I need this is I want to add a counter to check how many times the loop region has looped for and then depending on that do some actions.

As mentioned in earlier posts in this thread, there is no callback that fires when a loop region ends, but you can place a destination marker anywhere within the loop and use FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER to know when the playback position passes that marker. That should give you the information you need to make your counter work.