Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: YotamElal on Sat 14/05/2005 07:21:00

Title: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: YotamElal on Sat 14/05/2005 07:21:00
how ca I use SetMusicMasterVolume(0); to make the music at volume 0??

I tried the command in differnet places & It doesn't silent the music.

I can't use stopmusic(); cuz I want a fadeout the music.
Title: Re: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: Ashen on Sat 14/05/2005 12:13:52
I've noticed this too - it's because SetMusicMasterVolume() is slightly affected by the 'Music volume adjustment' setting of the room you're in (i.e Quietest, Quieter, Quiet, Normal, Loud, Louder, Loudest). Basically, to turn the music right off, you also have to call SetMusicVolume (-3), but keep in mind it'll be reset when you change room.
Title: Re: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: Goot on Sun 15/05/2005 17:54:28
SetMusicValue ranges from 3 to -3 where 3 is loudest and -3 is silent.
Title: Re: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: YotamElal on Mon 16/05/2005 10:18:07
THNX :o)
Title: Re: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: MrCheminee on Wed 06/01/2010 17:10:39
*Nevermind, solved my problem*
Title: Re: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: MrCheminee on Sun 07/02/2010 17:09:50
Or so I thought.

I want to change the slides so they will silence sound and music when they are on zero, but I just can seem to get this working... Anybody any tips on this matter?
Title: Re: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: Ethan D on Sun 07/02/2010 17:37:12
There are two types of vaules for volume

The Master volume which is in between 0 and 100 with a default value of 100

And then there is the room value which is between -3 and 3 with 3 being the loudest.
When the room is changed this is reset to 0 so the music would continue playing

If you want the music to stay completely off in all rooms have an if statement checking where the slider is at and if it is at 0 then in the before fadein on each room have the room value set to 0.  If that all makes sense.

EDIT:  I mean set the music value to -3.
Title: Re: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: MrCheminee on Mon 08/02/2010 09:10:57
Yes and no, it kinda stange I have to do this on every room, but it works, so thank you. :)

Edit: Setting the value to -2 worked also(no music, when the slide is down), which I find rather strange, because then what good does the -3 value do?
Title: Re: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: Khris on Mon 08/02/2010 10:14:36
You don't have to do this manually in every room...
Use the on_event (http://www.adventuregamestudio.co.uk/manual/TextScriptEvents.htm) function.
Title: Re: SetMusicMasterVolume(0); Makes the music quiet but not off?
Post by: MrCheminee on Mon 08/02/2010 12:14:23
Great! That's what I was looking for. Thankyou!