Suggestions for implementing Charged Weapon Sound in-game

Hey guys, I’m working on a project where a charged sound for a certain weapon is supposed to be called from an FMOD event into Unity when the mouse button is held down.

Right now, the trigger behaviour is such that not matter what, as a script is calling that event, a click of the mouse still calls the charged sound which is not what we want, if the mouse is clicked once, it should just be a one shot sound, which is another event, called by the script.

I wanted to ask, would you consider this a concern for the programmer, or are there creative ways through Fmod in which the setup we’re looking for can be achieved?

I’d love any advice if possible!

The great thing is that there are many ways to approach problems like this, and no right or wrong way.

As an example:

  • Have a single event with both the charge and shooting sounds separately.
  • Add a loop/sustain to the charge for the maximum and a transition region over the whole charge sound that sends to the shoot effect.
  • Add a parameter to control the transition region, this can then be adjusted in game to go from charging to shooting.
  • In the game code, have the mouse button press start the event and mouse button release set the parameter to trigger the shoot sound and end the event.