Firing Sound not stopping

Hi!

Not sure what I’m doing wrong here. When I release the mouse button, the firing sound doesn’t stop. And if I press it again, the second firing of it overlaps the first and makes it REALLY loud.

Just to make sure I have the full picture, can you show me your code for Start Firing Weapon as well?

Sure thing

Ok, now can you show me where you’re playing the sound? Similarity, where you’re calling StopFiringWeapon?

Sorry for the late response I took a break for a couple days. I’ve changed the blueprints around a little bit since I’m in a different version. Here is what I ended up with, and I don’t know what else I could change to make this work.

Alright, so you have two issues that are leading to the same problem.

  1. When you spawn the sound using the SpawnSound2D node, you’re not saving the result by setting WeaponFire to the output, for example
    image

  2. Because the IsValid node you used has no input object connected to it, it will always use the Is Not Valid execution pin, so it never ends up calling the Stop node it’s connected to.

If you set WeaponFire like I show in the example screenshot, then the sound should stop successfully with the code you showed me in your first post.

Ok, I’ll have to rewatch the lesson and change everything back in order to get it the way it was in the first post. Can’t work on game dev today , but I’ll give it a shot ASAP. Just want to say thank you for all the help you give here it’s much appreciated

Privacy & Terms