Looping audio component doesn't stop when requested.

Hey Guys,

Having a problem that I hope someone can help me out with. I’m editing an elevator blueprint where I intend to have 3 audio sounds play:

A “START” sound as the elevator starts up

A “LOOP” sound as the elevator travels

A “STOP” sound as the elevator reaches its destination.

So, START sound plays fine and then the LOOP sound begins - it gets set to an audio component which gets stopped when the elevator reaches its destination prior to the STOP sound getting activated.

But - the LOOP sound doesn’t stop looping! Here’s the weird thing though - every time I change the blueprint, the LOOP sound seems to stop where intended the first time I compile and run the game, as it’s supposed to. But then, every other time I run the game, it doesn’t work again and the loop sound just continues indefinitely! If I add a new node to the blueprint (for example a Print String), it works and the string is printed the first time I recompile. But then, once again, it doesn’t work for further instances and continues to loop with the Stop node apparently having no functionality.

Anybody have any idea what’s going on? I’ve tried putting the stop node at multiple points in the blueprint, I’ve tried setting the sound to a concurrency class - nothing has made a difference. The setup is obviously working in principle it sometimes works as intended - only for me to be disappointed the second time I run it. It’s only when I make a change to the blueprint that it seems to work again - one time!

Can’t really think what it might be, so as usual either it’s a bug or, more likely, I’m being very dim and missing something obvious. The fact it works once each time makes me think it has some obvious problem, but I’m stuffed if I know what!

Thanks in advance for any insight guys!

Post your blueprint showing the start, stop and loop.

Are you playing from the level BP or inside a BP?

Rev0verDrive - I’ll try and post a photo of the relevant section shortly.

ClockworkOcean - It’s playing from a BP that handles the elevator controls.

Ok, then this is how:

Thanks so much for your help guys. I’ll try these solutions and post my blueprint when I can, but I think the diagram has suggested where I’m probably going wrong!

Still having trouble with this. I’ve got it to spawn the sound and set it to an audio component. The timeline then updates as the elevator moves from the starting position to the ending position.

The problem is, whilst the ELEVATOR STOP sound plays, the ELEVATOR LOOP sound continues even though I’ve put a Stop node in upon finishing the Timeline. Immediately above the Stop node is the Play Sound node which plays the ELEVATOR STOP sound - so I know the Stop node runs, it just doesn’t seem to actually stop the LOOP!

Sure I’m missing something obvious here, but any help would be appreciated!

Can you show the whole BP, I can’t tell from what you have here…