Fast firing weapon problems

Variable rate can also be achieved on the timeline. If you raise the event master pitch (from the event macros), the timeline runs faster. If you then pitch down the multi-sounds in the timeline by the same amount (ie, you have a linear pitch-up envelope in master pitch, and a linear pitch-down envelope of the same amount in the multi-sounds) you have variable trigger rate. This can be helpful sometimes if you want to sequence multiple layers of sounds (like gun shots, slaps and mechanics) on a timeline.


Another thread on variable / dynamic fire rate:

1 Like

Ok, still having problems. I updated FMOD and the scatterer instrument works now. If I create a sustain point and press “KeyOff”, everything stops as intended.

The problem is how to implement this in game. What code should you write to call the key off?
Currently we are doing this:


But this results in the weapon only playing the firing sound every 3rd time or so, when I actually press the fire button. The audio only plays now and then when pressing the fire button.


I don’t know how to correctly implement the keyoff in Unity or with the API. However, there’s a nice workaround: condition the trigger point to “event stopped” (I will assume you have a recent enough FMOD version). That way, you’ll only need to stop the event to have the sustain point triggered.

Ah, like this?

If I make the event stat “Stopping”, then it doesn scatter correctly. It only plays the sound once and does not scatter.

But the above picture setting, seems to work, at least in fmod. Will have to ask programmer to revert to stopping the old way before i can test

Thanks man!:slight_smile:

Yes, “not stopping”, that’s what I meant :slight_smile:

Cool. Will test:)

Ok, seems to work. I do get some delay sometimes though, when i press down the firing button for a long time, and release the button, the firing sound stays on for maybe 0.5 sec or so. But this might be a programming thing and not something with fmod.
But thanks:)

1 Like

I remember some delay issues have been reported when using the event stopping state. It was advised to change a setting in fmod initialization. It this persists, it may be preferable to implement the keyoff.

Ok, could anyone tell me how to do proper key off in code? Need to pass that info on to the programmer.

Information on how to key off a sustain point from code can be found in our documentation.

1 Like

Usually I put a jump marker after every bullet and it works great

If you can find and match the exact BPM of the firing loop, you can use a transition region with the “transition on beat” option. Though … if it’s a very fast firing gun, the BPM setting may not accommodate that. Anyway, that’s one way to avoid having to add a transition marker to every shot in the loop.

Great solutions Bubbleboi and Skaven. Thanks