Anyway to make a sound not stop mid-loop?

Hi, I’ve just started to playing around with fmod and unity. I have an event with a loop region that plays when a button is held down. Now when the button is released I call for the event instance to stop, but it sounds awkward when it stops in the middle of a loop, and I usually get an ugly click sound. Is there anyway to get it to stop only after the current loop has finished? Or is there some better way to make a constant firing sound (like a machine gun), for example playing oneshots over and over?

Ah cheers. That did the trick.

There are a couple of ways to achieve this, one way would be to set a parameter condition on the loop region, when the gun should stop shooting, adjust the parameter and the timeline cursor will continue to the end of the timeline.

What type of parameter would you set with the machine gun sound? I’m setting up an event for a FPS AK rifle shot, but I can’t seem to figure it out to not only include the loop of the track, but also include a loop of a falling shell casing

I’m setting up an event for a FPS AK rifle shot, but I can’t seem to figure it out to not only include the loop of the track, but also include a loop of a falling shell casing.

Have you looked at the Machine Gun event in examples.fspro? While it lacks the triggering parameter mentioned earlier in this question, it’s a good example of a shell casting and gunshot sound in the same loop.

1 Like

Thanks! I found the example