UE4 enemy impact sound loop/doonce bug

Hey, pplz, heres an update of how the games going. Ive been able to fix everything so far. But now I ran into a little bug whe adding the impact sound to the enemy. i’m using a sound cue with various sounds on random. It’s supossed to play one of them once with each hit, but it either loops, or if I add do once it plays once or twice and then doesn’t play again. Any of you have any ideas?
heres the vid:

I think it’s because you’re spawning a sound rather than playing an existing sound in the level or “play sound at location.” Hard to tell with the information you gave. You might have a looping node in the soundcue you’re spawning? I say switch it to a “play sound at location” and see if that helps. Also take out the “DoOnce” or have it reset after the sound is played, otherwise it’ll only play once in the game.

I already tried with “play sound at location”, just changed it just to see. It doesn’t affect it. And when I plug the “play sound” to the “do once” reset, it just loops.
And theres no loop on the sound cue.

You wouldn’t loop directly back to the reset after the play sound. The whole sequence happens so fast that it defeats the purpose of the “do once.” Generally you would have another event reset the do once, or at the very least have a small delay before resetting.

That doesn’t seem like the issue though, since in the video it only spawns the sound once, yet you hear the sound over and over. I can’t read much of your blueprints because it’s not in english, but I suspect your issue is in some other area. Do all the sounds in that sound cue have a gore element to them? I’m hearing some sword hits with no gore sound.

The words in spanish are the tipical for adding a sound. “On Component hit”- “Cast to als character BP”- “Do Once”- “Branch”- Play sound to location"
And on the sound cue its just “wave players”- “Random”- “Mix”
There all gore sounds, a one is mixed with i bit of sword slash at the begining of impact for a blend to see how it mixes when I add the sword slash sounds.

What event can In add for the reset?

It really depends on the situation. How often can the enemy get hit? You could probably just have a short delay after the play sound. Something like .1 or .2 seconds should be fine to stop any immediate repeats.

I don’t think that’s the issue here though.

There’s a lot of troubleshooting that needs to happen, and I have no idea what you’ve tried. What happens when you disconnect the whole event? Any sound at all?

It’s not set to looping in sound wave properties or somewhere either?

No sound at all. And adding delay doesn’t do anything.

And no, no loop that I can see.

You probably already fixed this, but I ran into the same thing. Its looping because you are telling it to Do Once after it players once, and then the hit fires off again. Youd think Hit fires just one time when it touches but, it continuously fires off as objects roll or slide against things too, so thats why its looping is because Hit continues to fire off.

What I did was make a Sphere Collision component in my actor, and then mark it to overlap my world or other solid object types, and make sure it has overlap events turned on. Then I just adjusted the radius to be a generous but small size to loosely fit the object that the sound goes with, and then I use End Overlap on that Sphere Collision to reset the Do Once playing the sound. So Hit goes to Do Once, play the sound, and then End Overlap resets.