Sound handling(preventing overlap)

How would I approach preventing overlapping sounds? Not in the “I forgot to set it to only trigger once” way, but in the “The player has an ability with it’s own sound that can be used in quick succession, causing overlap and increasing the volume of said sound(in this case, a double jump)”. I wish to figure out how to override the first sound, for that smooth response of a second jump truncated with a second jump sound.

Normally I try not to truncate any sounds, but ensure they don’t overlap at all. In general, I recommend only using the sound events that involve playing/using sounds on a channel.

This way you can use the condition “Sound on channel Blah is finished playing” as a condition on your sound effect events. Have it check the same channel that the sound you’re playing is on, and it’ll only play a new instance of the sound if the first one is done playing.

This way I usually dedicate channels to specific things. Sound channel 0 for music, Sound channel 100 for player jump, 101 for player attack, etc. (Sound channels are just a number you define when playing the sound).

1 Like