Slider not working properly

Started by Gepard, Tue 16/08/2011 22:35:36

Previous topic - Next topic

Gepard

Hi there!

I'm having a slight problem with my sliders. I set the min values to 0 and max to 100, but when I use the slider to reduce the music to 0 it just lowers down the volume but does not turn off the music completely (mute). You can still hear the music in the background. Also when I play windowed, the brightness slider is not working... Help please?

Thanks!
Drink up me 'arties! Yo ho!

Khris

Not sure about the music issue, the Gamma slider will only affect a game played @ fullscreen though.

monkey0506

Which version of AGS are you using? In AGS 3.2+ there's the System.Volume property, which when set to 0 should be completely muted. Prior versions used two separate functions though, SetMusicMasterVolume and SetDigitalMasterVolume, so it's possible that if you're only setting one or the other that it might not completely mute all of the sounds.

If you want separate sliders for various audio types then in AGS 3.2+ there's Game.SetAudioTypeVolume which would allow you to do something such as:

Code: ags
  Game.SetAudioTypeVolume(eAudioTypeMusic, sldMusic.Value, eVolExistingAndFuture);


To change only the volume for current and future playing music to the value of the sldMusic slider. Prior versions of AGS only had SetSoundVolume (and SetSpeechVolume), and used the master volume settings for other audio types (music).

So, without knowing what version of AGS you're using I'd wager a guess that you're using a pre-3.2 version, but you haven't posted any code so it's hard to tell. :P

Gepard

2.72

I have been working on this game for a veeery long time. And now it is impossible to convert it to higher version without losing data...

Thanks for the help anyway.
Drink up me 'arties! Yo ho!

RetroJay

Hi Gepard.

I had exactly the same prob with 2.72.
The sliders never seem to work properly with music.

In the end I just went for 'music off' or 'music on' buttons.

I have been, also, working on my game for a, VEEEeeerrrryyyy, long time.
If I try to put it across to any AGS engine higher than 2.72 I get alot of errors, mainly with 'Lake module'  I don't understand the errors.

I have said this before but I prefer 2.72.
It's what I learned on and I don't want anything else.

Jay.

monkey0506

You should be able to upgrade most, if not all, 2.72 projects to at least 3.0 without having to do too much work, given the right settings. If nothing else, disabling the object-based scripting setting should allow most deprecated functions to work. 2.72 is no longer "officially" supported (meaning no more bug fixes or the like will be released for that version), but if you could show us the code you're using we still might be able to help you.

SMF spam blocked by CleanTalk