Trying to Common Event Random Music (MZ)

Hey all,

I have a music shop as location in my town, and I'm trying to make it so a random song plays for about a minute at a time while you're in there, then switches to another song (assuming the player is still inside). I got this idea from an older MV post, but it looked like it should work in MZ.

I'm not sure where it's failing.

I have the common event set to run parallel inside of the shop. The way I understand it, it should be generating a random variable -> conditional branch based on that variable, which is assigned to its own song -> song plays for about a minute, fades out, then resets the variable to 0 -> 0 variable triggers another random number... Rinse, wash, repeat, right?

But for some reason (and maybe it's just really odd luck) it constantly plays the first song (and everything else works as planned as far as the play time, fade, and reset - but it goes right back to 1).

What am I overlooking?
After the first “end”, you are setting your random variable to 0. Get rid of that line.
After the first “end”, you are setting your random variable to 0. Get rid of that line.
That got it. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-common-event-random-music-mz.162477/