Suggestion: ChangeMusicOnLoad()

Started by Vince Twelve, Fri 27/06/2008 03:59:25

Previous topic - Next topic

Vince Twelve

I just had a moment in code where it would have been nice to be able to change the musicOnLoad value, but it's readonly and so I had to do a little work around.  Not difficult, but would me convenient.  Unless there's a way to do this that I'm overlooking.

Shane 'ProgZmax' Stevens

Better/more music controls would definitely be welcome.  I'd especially like to see volume handled a bit differently since right now audio volume in ags for music seems considerably lower than it should be.  It's much louder in the music plugin, for instance, and in both media player and other programs I use without any special adjustments.  I'm not sure why this is, but I think it ties into there being two music values (MusicMasterVolume and the individual room volumes).  Perhaps we could do away with the room volume and have music master volume handle the volume properly, since you can't actually set the volume of a song to 0 with musicmastervolume currently (my workaround is just to use a slider and StopMusic() at 0 and PlayMusic() at 1 or >, but it would be more elegant if musicmastervolume actually did this).

Pumaman

Well, the room music-on-load setting is a room specific option that's not persisted when you leave the room, so it would be a bit involved for AGS to remember it. Would anyone else use a feature like this?

Vince Twelve

I see.  The only reason I suggested was because musicOnLoad is the simplest way to control music in a game, and while I rarely use it, I decided to do so in Nanobots, only to run into the reason I don't use it.  When I wanted to make the opening cutscene or any other multi-room cutscene play with the same music throughout, I didn't know of some way to make the game ignore the musicOnLoad setting just for that room.  So, I reverted to the old way of playing the music in the room's onLoad function instead.  But that way has some drawbacks too, like I had previously programmed the pause GUI to play some music when you opened it and go back to the musicOnLoad music after closing it.  Instead, I had to change it to remember the music it had been playing before you opened it.

Being able to change the MusicOnLoad setting would have made that much easier.  Not a big deal, just wanted to throw that out there.

SMF spam blocked by CleanTalk