Stop Overlapping

Let’s rewind a bit :slight_smile:

You have a number of BPs. Each one of these, on overlap, knows how to start audio and subtitles.

I see you’re using PlaySoundAtLocation, which doesn’t have a way of stopping the sound. Why not try SpawnSoundAtLocation, which is just the same, but returns a link which can be assigned to a variable. Later you can use that variable with a Stop call, just like I did above.

So, each BP can start audio, it also needs to be able to stop it. You have ( at least ) two custom events in the BP:

  1. OnBeginOverlap → starts the audio ( and subs )

  2. CustomEvent ( called maybe ‘Stop’ ) → stops the audio and subtitles started by this BP

Because each BP contains a Stop event, you can call it from any of the other BPs. That’s what the ‘GetAllActorsofClass’ is for. To find all the other BPs that might currently be playing audio, and ask them to stop, using the stop event.

So, 1) actually becomes:

  1. OnBeginOverlap → GetAllActorsofClass(MyBP) → Call the stop event on each one → Start my audio and subs

Does it make sense? :slight_smile:

( The way you’ve coded your subtitles, you wont be able to kill them from the Stop event. Maybe just work with the audio for now, until you get it working, and then re-incorporate the subtitles. )