How to create a box trigger that can swap between the same song on 2 different files at the correct time stamp?

I have 2 files for 15 different songs that are meant to play one or the other depending on if the player is within a certain area of the game’s map. I want to create a box trigger that, when it detects a player in the trigger, will play the file of the song meant for when they are inside the area and when the player leaves the trigger it will play the other file from the same point (each pair of files is the same length). I also want it to play the songs in a random order so that if one song ends, it will pick another one from random, just like the Random sound cue node. So far I only have this overlap loop which checks for a player actor and will change a boolean if it detects the player’s proxy, and I have no clue where to go from there.

I see nobody is posting on this. It’s probably because it’s a bit of a ‘mare’.

Can you use the music as separate audio files, or does it have to be 2 long files? The randomness is going to be a real fiddle if it’s 2 long files.

It’s quite possible to swap between the files as long as you keep a timer.

The music could be used as separate audio files and they’re all about 304 seconds long; I’m trying to have them play interchangeably depending on whether the function I have in the photo returns true or not

Well, this seems to work. Tested but not thoroughly:

Overlap:

Begin play sets up a timer:

And the event that swaps the music:

The arrays are just sound waves. And attached is a text file of the BP:

[link text][4]

PS: The two floats need to be the same, and the random int is the size of the array:

I figured out a working method if anyone comes looking at this with a similar issue.
This part of the blueprint uses the player camera’s distance from the object to lerp a volume multiplier for each of the songs.

And this randomly picks one of the songs, sets both of its files as active, delays until the end of the song, and then resets the song and sets it to inactive.

You also need to set the audio cues to “Play when Silent” and you need to turn off auto activation in the blueprint.

tested it in a new level and it worked fine for what I needed