I don't know what audiomanager._bgmBuffer.seek does. What is that supposed to do? And why did you not first try if the code works the way I showed you?
Without that part it works for me (I tested), so it should work for you too, at least if the name is spelled correctly.
The spelling of the name should be the same, and is caps-sensitive. So if the name is Disco1.ogg, then that is why it doesn't work.
I tried your way first, and got an error.
Then, i tried another. I wrote about it.
> You
shouldn't do this
I know. It will exist only in specific quest, where player has to turn the volume to zero to progress. But there is a sound that must be played after completion, and for that reason volume has to go up. But not on max to prevent it being too loud for certain players.
Also, i am looking for script to change volume of currently played BGM track as well, so i can make music less loud in dialogues so player can hear VO better.
Please do make sure to read Turan's post. Only do this if you're lowering the volume (and later bring it back up to what it was), or are doing an evented menu. But with that disclaimer, do this:
ConfigManager['bgmVolume'] = x;, where x is a value between 0 and 100.
ConfigManager.save() to make that change permanent (this will also happen when the user enters and closes the options menu).
Thank you, it works. Don't worry, player will be informed about the change trough dialogue, can re-adjust instantly after that, and it will only happen onces for needs of specific quest.
By the way, is there a way to "bring the volume to what it was"? That actually could be a lot better solution if there is a way to save volume level before player re-adjust it in the settings, and then return it to what it was trough the event.