How to randomize songs?
here is a sollution RalfTech
in config.js add this
sounds = [
"sound1.ogg",
"sound2.ogg"
],
add more/change names as needed.
in script.js add this line up where the this.texts are
this.sounds = sounds;
and replace the line
var src = this.soundfile;
with
var src = sounds[Math.floor(Math.random() * sounds.length)];
the rest can be left as is.
this should select a random soundfile you have set as the song to play, works on my server. remember to edit resources.lua so all files are included. i have 5 different songs to choose from. working on getting volume to work. if i get it to work i will post it here.
I need help still because I cannot change the music so can someone help me.
trying to get it to work with video it just keeps saying video not there
the music cuts out after around 25 seconds, Am i doing something wrong?
Github is down
Github link no longer available.