Setting editable audio component in blueprint

Hi! I am doing a blueprint of an object that is when interacted with, should play sound only once. The duration will be around 15 seconds. I need to be able to change the audio file for each instance of the blueprint from the world outliner. Any ideas on how this can be achieved?

Thanks in advance!

I would suggest using a veriable (sound cue or sample) set to instance editable. This will be accessible thru the details panel when selected in world out liner. You have a few options for implementing this veriable. Depending on if you want the sound location based or to just play as a 2d sound.

In the event graph right click and search Play audio have a look at the discriptions and pick the one that suits best.
You can now pass your audio veriable in to this play node.

To make it fire only once use the do once node (hold o on key board and click in BP event graph). This will only be able to fire again if you pass a line in to the reset pin.
Hope this helps

Thank you, it helped!
I forgot to tick the box on “instance editable”. And do once node was just what was needed. I found out that the variable type should be set to “sound base”, and only then it will work with location-based or 2d sound nodes.

Just to confirm how to find the correct class quickly. In any graph with a node that has a pin drag off that pin and promote to a veriable. In this case there are a few types that will work but some preparation may need doing such as creating an audio cue or an audio cue with a parameterized sound settings.

For most veriables you don’t need to start creating classes just pull off(in either direction) and promote to veriable