All I'm really using it for now is saving whatever BGM the player is listening to so that when they log out and back in the same BGM is played.
Create the var using sound datum
mob/var/sound/music
Play the sound through the new music variable, In this example it's in my character creation system right before it moves them to the starter town.
NewChar.loc = locate(/turf/start)
M.client.mob = NewChar
NewChar.music = sound('Mus07.mid', repeat=1, channel=1, wait=0)
NewChar << NewChar.music
And play it again when loading the char (code not really required there).
Question is, how do I actually use it? Can I actually manipulate the sound that's currently playing with it?
I read the reference entry for vars (sound), and it led me to believe that I could do something like this:
mob/verb/lowervolume()
usr.music.volume=50
It didn't actually do anything though, any suggestions?
what exactly can I do with music now? Is it possible for me to add verbs that do stuff like music.volume=(whatever) to adjust the volume while it's playing or maybe something that does music.repeat=0 if the player is sick and tired of hearing the same bgm over and over again? How about stop and play?
Just kidding. :/ I got it resolved.
Turns out you gotta resend it. I would love if you didn't have to, since it restarts the current song, but ohh well.
Got a nifty little statpanel for music now too that shows all the music properties, Gonna make it so you can click each one to modify it directly. :)