Playlist audio player for web

So, here is my question… What I want in the car game I am working on is to have some kind of music player… I have produced some songs and I want to arrange them so that when one song ends it will play another… If it is a random song even better…

I have not found any similar examples here so if anyone has any idea how to go about it, I would really appreciate it…

1 Like

You can do it like this:

[code]Variable track = Random(9) // 10 tracks

If variable track is = 0 | Play first music
If variable track is = 1 | Play second music

Instead random you can increase the track as well:

Do = mod(Variable(track) + 1, 10) to the variable track

The mod() is to make the variable go back to 0 when reaches 10.

You can do real random filenames through JS or C++ too: [url]After collision i wanna to play random sound from my choice.]