This is not a big problem but i was just curious. Can one lower the music volume when a note is read out loud? In Dark Descent all of Daniel's journals play different music. but I want to keep the same music but have the volume drop just a bit.
The PlayMusic function has a volume argument.
Playmusic doesn't allow me to change volume of music thats already playing, also, I need the volume to go back to 100% after the player reads a note. I am not aware of a function that does that.
If nobody knows, its no big deal. I was just wondering. Thanks for the reply.
PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
I believe the "Bool abResume" set to true will allow you to change the volume while having the music playing.
Hopefully.
(07-16-2012, 10:32 AM)Acies Wrote: [ -> ]PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
I believe the "Bool abResume" set to true will allow you to change the volume while having the music playing.
Hopefully.
Holy cow! I didn't notice that before. I'll play around with it and see if it works. Thanks.
This seems to work:
void notevolume(string &in item)
{
PlayMusic("04_amb.ogg", true, 0.7, 0.5, 2, true);
AddTimer("", 0.1f, "musiccomeback");
}
void musiccomeback(string &in asTimer)
{
PlayMusic("04_amb.ogg", true, 1, 0.5, 3, true);
}
The only problem is that the music's priority increases and that may mess up other musical cues in the level. Sure, I could add "StopMusic" but that would have a split second of no music even if fade is set to 0.