I have an array of lights that activate when the player overlaps a box collision which is working well. The only issue is that the SFX for the lights remain active when they should stop, images, blueprints and video below, thanks in advance!
That’s not good, right? The overlap would then create 2 sounds but only reference the 2nd one. The 1st sound would become orphaned an inaccessible. You could fiddle with the DoOnce node but it’d be better to address this issue at the core - what are the chances Marcus has something attached to him that also triggers the overlap?
You could print the display name of the component after the cast:
You’d then know what is the other bit that messes this up. It should be capsule only. Do tell what you find out.
So it actually triggers 3 times it seems. You’d need to ensure the Flashlight and the character Mesh cannot interact with the Box - I assume the cylinder is the capsule collider. We’d need to look into the collision settings of those elements.
Chances are the errors come from the fact that the sound no longer exists (it has played once and self-destruct) yet we attempt to Stop it. Perhaps there is no need to reference or Stop anything. Spawn Sound → Fade. If you want looping sounds, that’s another story…
I’ve attempted to make it fade out before it stops
Stop will not wait for anything, all non-latent nodes execute immediately one after another.
Yet another, albeit somewhat cumbersome, way is to use a validated Get: