I want to play a punch sound on specific animation frames. If I use the following, I get an echo effect because C3 plays the sound once every 1/60th of a second that the animation frame is playing:
I can do the following, which will prevent the sound from playing again until it has completed playing:
However, this wont work as I do want some overlap, and I don't want to wait for the full punch audio to end before I can play another. The best solution I came up with was:
I'm not a fan of this option, since I'll have a lot of sounds playing and will need a lot of these soundPlaying variables to keep track of. It's just not very clean.
Is there an easier solution?