Audio trigger

So I placed a Trigger around a piano, and when I walk up to the piano I trigger the audio, how do I let the audio play through till the end without it playing again over the first one when re triggered? Every time I walk to the piano the audio just overlaps multiple times

DoOnce node :wink:


thank much! :smiling_face_with_three_hearts:

1 Like

Ok, So that works great, but now when I go back to the piano, it does not play again, hence the do once node. Can I get it to play every time I go near the piano?

You have to reset the do once when you walk away. Either

  1. Stop the music and reset the do once when the player walks away


  1. Reset the do once when the music finishes.
1 Like

Ok, so i was fiddling around and still can’t figure out how to place the reset node?

1 Like

I’m gonna have to keep trying, that “Stop” func you got there I can’t find in the list

You need the right kind of variable. To get the right kind, right click on the output of the spawn and choose ‘promote to variable’.

1 Like

Ok, I’m up to here now, but audio does not trigger again when walking to the piano

Nope. Please look at the picture again… :slight_smile:

Get the right variable type first. The stop event can be found by dragging from that.

Getting closer? lol

Nope, sorry… :-/

There’s nothing running the node:


You need this whole chunk

1 Like

Ok off to bed, I’ll have to figure it out tomorrow night, thanks for all the help. I see I’m just getting error now :wink:

1 Like

Try this method, it isn’t necessary to call more than one function to achieve what you need

1 Like

It’s just the Target and Sound box I can’t find?

Top left, add audio component. Add sound you want to the audio component. Drag the component reference to the pin on the spawn audio node node.

Drag from that component reference, get duration, feed that to the delay

@Haanswors edited to make it clearer and add the delay also - feel free to ask again if still it making sense

1 Like

Also I would suggest you to go over the starter blueprint tutorials on the Unreal Online Learning Website, this will help you to refresh this kind of stuff.

1 Like

Thanks so much I finally got it! :wink:


Awesome! don’t forget to mark the issue as closed!

1 Like