Audio is not playing when trigger by branch, is that bug?

Hi, I am new in Unreal Engine 5.2.

I tried to trigger the audio to play by the condition, shoot the door for few times so it will open. And tried connect node with Event Begin Play and Even Tick, or non. But all of them are not working when it’s trigger.

if I delete Branch node, the audio is working but it will play initially.
if I add it back, it won’t play the sound while trigger it.


I have try and test everything make sure the blueprint has no error, it shows it’s running when I play the game.

I found nothing about it on Google and communities.

Hi @smoking_bad , Here is what is going wrong.

  1. Begin Play only runs when actor is spawned. I am assuming at that time your door is closed so no sound is played
  2. On Tick Event, when “IsOpen” becomes true “Fade In” is definitely working. The only problem is because it is called on Tick, it is triggering 60 times per second (Could be a different number) and everytime it is called it resets to zero. So you don’t hear anything.

What you need to do is when the door is opened you call the fade in once to let the sound play. I have shared an example of how you can potentially do that.

I have called it on Event Tick but just to showcase the logic. Generally you wouldn’t call it on that. You can use “Do Once” to make sure that sound is played once. After the whole played, you call an event that is plugged into reset of “Do Once” so the logic beyond it can be executed again.

I hope this helps. Feel free to ask any questions if there are any confusions.

Thank you that works!