Download

Array of sounds

Hi.

Basically I need to play about 20-30+ sounds in the game from one AmbientSound node in the game

So I figured I’ll make an array of sounds and then loop through it as required and invoke PlaySound. But so far it has not worked for me.

For example I am not sure how to initialize the sounds. It seems that I can add AmbientSound to the EventGraph and then I need to invoke SetSound to initialize it, but I can only set one sound to AmbientSound node.

So the question is, how do I dynamically SetSound on one AmbientSound node?

Naturally I wanted to add a bunch of sounds to the array and then loop through it calling play sound as required, but I am not that this is possible.

Cheers,
Andrew

Found the solution: https://answers.unrealengine.com/questions/27527/array-of-sounds.html#answer-27542

Thanks for updating the answer for future people. You’re a good person.