Suppose you wanted your game to consistently play one of several included music files. When one music file finished, it would randomly pick another music file to play afterwords. Any one except the one it just played, but preferably shuffling all the songs into a random order then playing through all of them each time around.
Of course, the player should also be able to turn this music off and on again any time they want.
How would you go about doing that?
ID:159201
![]() Apr 21 2009, 6:11 am
|
|
Something like that could work. You could sort the list to start with, or even once every time it starts playing.
With the Toggle Music verb, if somebody starts hearing a song in the middle, it will get cut off before the end in order to keep all players hearing the same music. If you didn't care about that then you could just make it a mob/proc.
You may also want to add something on Login() to play the CurTrack, otherwise people won't hear music until the next song starts.