Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: YotamElal on Wed 04/05/2005 16:02:23

Title: fade out music?
Post by: YotamElal on Wed 04/05/2005 16:02:23
how do I fade out music?
Title: Re: fade out music?
Post by: GarageGothic on Wed 04/05/2005 16:12:49
I can't see any GetMusicVolume command, so try this:

int vol = 100 (or whatever the music volume was);
while  vol > 0 {
  SetMusicVolume (vol);
  vol--;
  wait(1);
  }
Title: Re: fade out music?
Post by: YotamElal on Thu 05/05/2005 08:04:54
SetMusicVolume doesn't work but SetMusicMasterVolume should work.
But there is no change of volume????
?

Title: Re: fade out music?
Post by: Ashen on Thu 05/05/2005 11:46:36
SetMusicVolume () can only have values from -3 to 3, which is why it didn't work.
Since SetMusicMasterVolume () isn't working either - bear in mind there are a few different Set...Volume() commands, depending on what you want to change the volume of. Try them all (or look them up and see which you want):
SetMusicVolume () [-3 -> 3]
SetMusicMasterVolume () [0 -> 100]
SetDigitalMasterVolume () [0 -> 100]
SetSoundVolume () [0 -> 255]
SetSpeechVolume () [0 -> 255]

Also, where have you put GG's code? It's possible it just isn't being called at the right time.
Title: Re: fade out music?
Post by: YotamElal on Thu 05/05/2005 18:44:53
I want to use SetMusicMasterVolume () but it doen't work.

the code is in after-fadein section.
Title: Re: fade out music?
Post by: YotamElal on Sun 08/05/2005 09:20:38
Someone please help..?
My game is finished and this is one of the last things I need!
Title: Re: fade out music?
Post by: strazer on Sun 08/05/2005 19:32:16
Are you sure the music is playing in the music channel? Which command do you use to play the music?
Title: Re: fade out music?
Post by: YotamElal on Mon 09/05/2005 04:47:11
Playmusic();
Title: Re: fade out music?
Post by: strazer on Mon 09/05/2005 05:07:03
Are you sure the code executed at all? Try putting a Display command there to check.

Just so we're clear, you have this:


  int vol = 100;
  while (vol >= 0) {
    SetMusicMasterVolume(vol);
    vol--;
    Wait(1);
  }


in the "Player enters screen (after fadein)" interaction of your room, right?
Title: Re: fade out music?
Post by: YotamElal on Mon 09/05/2005 05:28:33
I used the code u gave me and added a display() after it and the display loaded after a sec and the music volume didn't change.
& the code is in (after fadein)