Triggering Events to set a Parameter (Gunshot Counter) or other method?

I’m trying to figure out a way to keep a shot counter within fmod rather than using game engine code.

My idea was having gunshot event with an empty timeline and use the parameter to trigger sounds. The parameter would be a user labeled parameter (labeled Shot 1, Shot 2, Empty). Shot 1 would play the first gunshot, Shot 2 plays the second, and Empty would be a dry fire.

Ideally each time the event was triggered, it would somehow move the parameter up by one. So by the third shot it would remain on empty.

I don’t believe this parameter idea is possible, and I’ve been racking my brain to come up with an alternative method. I’ve experimented using the timeline, sustain points, sidechains, and transitions but nothing has worked out.

Any ideas would be greatly appreciated :slight_smile:

The simplest way to do this is to use a global parameter and command instruments. Global parameters are shared across the entire FMOD Studio project, so any change made to a global parameter will persist across all event instances. Command instruments can be set to increment the value of a parameter when triggered.

Hi Joseph,

Thanks for the reply. Command Instruments have always stumped me as it seems difficult to find documentation on them and their features. Could you forward me to any literature on how to use the command instruments to achieve your solution?

Cheers!

~ edit : i’ve been working on a project and locked into 2.08. Just updated to 2.1 on my home computer and see the new command instrument features you mentioned. it will be great for the next project. thanks!

Information on command instruments can be found in the Command Instruments section of the Working with Instruments chapter of the FMOD Studio User Manual.