I’m using the UE4 system for double jumping (I set the max jump count to 2) and I was wondering if there was an easy way to have a sound trigger on the double jump? (I tried searching online for this but google isn’t giving me any kind of results for this, one was a UE forum post but the solution didn’t work) I was able to get the first jump sound to play by telling the blueprint to play the sound once if the player is in the air, but I can’t figure out how to trigger another sound for the final jump. I think I’m struggling with the DoOnce node as I can’t figure out a good flow for resetting it correctly, as it either spams the sound or doesn’t play at all depending what I do.
Hi, thanks. For whatever reason I think I was trying to make it more complicated than it needed to be this worked slightly, the only problem now is that the sound can be spammed as I can keep pressing the jump key again and again. How can I fix this? I tried using the doOnce node, but it just cancels anything past the first jump and I can’t figure it out.
Hi, that doesn’t seem to be the case. Even with the doOnce node removed, I can just keep spamming the jump key and it keeps triggering the sound over and over again
On pressed check ‘is falling’(movement component).
If true, play double jump sound , then execute jump.
If false play first_jump sound and execute jump.
did you mean like this? I tried it, but I can still keep spamming the sound effect. The jumping part of things is fine, I just need a way for the sound to not be able to be triggerable over and over again
After double jump sound set a Boolean “already_doublejumped” to true. Use this boolean to stop repeating sounds. When the character is not falling reset the boolean to false.