Sound overlay and stop local sound

Hi,

I have 2 problems:
How can I stop the sound overlay?
If the last laser is interrupted, the last Sound should also be stopped and not all Sounds

Thanks in advance!

  1. Can you elaborate on what you mean by sound overlay? Do you mean the attenuation settings?

  2. I’m not sure I understand correctly, but it sounds like you are referring to all sounds being stopped, not one in particular. Are you controlling the sounds within a sound cue or are the sounds being played by multiple audio components?

Let me know and I will try to help further :slight_smile:

  1. When the sound is played, it sounds like multiple sounds are playing at the same time.

  2. When the last “Line Trace By Channel” is interrupted, the local sound 2 should also stop, but the local sound 1 of the first “Line Trace By Channel” should continue to play.

I see. Let’s focus on fixing the first issue. You are hearing multiple sounds, probably because there are multiple sounds playing.
I need more information. Are you by chance playing the sound when the line trace hits something? That would mean a new sound is being generated every time the line trace hits something (depending on what’s happening it could be every frame.)

Yes, if the line hits something, a sound should play at the point of impact.

Ok, should the sound continuously play or only once?

If only once, add a “Do Once” node before the sound node. When the line trace is interrupted (I’m assuming, something else is in the way or the target object is gone) you can reset that node.

(In general, I appreciate as many details you can share as possible about what you’re making in order for me to help you.)

when I use “Do Once”, the “Line” is only generated once. No further line is generated.

The blueprint is too large and complex.

The Do Once should be after the line trace. I’m assuming you are doing this on tick in order to have a line every frame? I’ve attached an image showing where to place the “Do Once” node.

yes, the sound works, but only one line is generated

If you have it on tick and set the draw debug type to “for one frame”, you will see that a line is being generated every frame.