HELP: Destroy an audio cue

I am having a lot of trouble with getting a sound cue destroyed when someone presses E on an actor. I have an item that’s on the ground, and I want the background music to get destroyed once someone picks it up. How do I do this?

You can use the “DestroyActor” node on the cue if you spawned it.

The point is, I did not spawn it. It’s just an object I placed. So how do you destroy an object thats placed? Like a light.

You will need to get a reference to it. The best way would be to spawn it on event begin play rather than placing it, then you have the reference. Alternatively you could do something like give it a tag, get all actors of type sound cue, then check for the tag on each one. If it has that tag, then destroy.

You could also add a reference to i.e. the level blueprint and make a function to destroy it there. Then call the function from wherever you need it.

How do I call the function thats inside of the level blueprint?

Use an event dispatcher.