ID:174126
 
i need to know how to automatically play random songs. i currently use this

mob
Startup

Login()
usr.loc = locate(5,5,1)
usr << sound('SONG1.wav',0,1,1)
..()

i dunno how to make it play several songs repeatedly in random order. can any1 help me?
ZDarkGoku wrote:
i need to know how to automatically play random songs. i currently use this

mob
Startup

Login()
usr.loc = locate(5,5,1)
usr << sound('SONG1.wav',0,1,1)
..()

i dunno how to make it play several songs repeatedly in random order. can any1 help me?

var/list//make a list for the world
Music=list("whatever.mid","whatever.wav")

var/l=pick(Music)//picks randomly out of the list
src<< sound(l,1)//plays it

Im not sure, if that would work as I diddnt test it.