AudioManager.bgmVolume = 100; issue

Discussion in 'RPG Maker MV' started by thalesgal, Sep 6, 2019.

Thread Status:
Not open for further replies.
  1. thalesgal

    thalesgal Veteran Veteran

    Messages:
    160
    Likes Received:
    28
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Hello guys! I'm having a problem trying to replace the SceneManager.push (Scene_Options); script call.

    I created a menu that the player can choose different types of presetings audios.

    Each option will have a custom volume amount. I do this through this script call:
    Code:
    AudioManager.bgmVolume = 100;
    AudioManager.bgsVolume = 100;
    AudioManager.meVolume = 100;
    AudioManager.seVolume = 100;
    It works nicely, but the problem is that through this script call the game does not memorize the settings. So when you close the game it goes back to what it was before.
    I would like to know which script call I should put to memorize these audios parameters.

    Thank you very much in advance!
     
    #1
  2. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    817
    Likes Received:
    317
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Hi @thalesgal !
    I think you have to try this:

    Code:
    ConfigManager.bgmVolume = 100;
    ConfigManager.meVolume = 100;
    etc...

    And when you finish setting this you call:

    Code:
    ConfigManager.save();
    > This code will generate the file in the save folder that stores the config options.
     
    #2
    thalesgal likes this.
  3. Ossra

    Ossra Formerly Exhydra Veteran

    Messages:
    871
    Likes Received:
    633
    First Language:
    English
    Primarily Uses:
    RMMV
    Whenever the user presses the 'Save' or 'Ok' button, you should probably save the configuration with something like this :

    Code:
    ConfigManager.bgmVolume = 100;
    ConfigManager.bgsVolume = 100;
    ConfigManager.meVolume = 100;
    ConfigManager.seVolume = 100;
    ConfigManager.save();
    On load of the options window, you can use ConfigManager to set any controls you have on the window :

    Code:
    this.dodadThingie = ConfigManager.bgmVolume;
    // Etc ...
    EDIT: Oop, yeah, basically what Eliaquim said.
     
    #3
    thalesgal likes this.
  4. thalesgal

    thalesgal Veteran Veteran

    Messages:
    160
    Likes Received:
    28
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    #4
    Eliaquim likes this.
  5. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,685
    Likes Received:
    4,162
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP
    @thalesgal If your query is solved, please report your post and a moderator will close this.
     
    #5
    thalesgal likes this.
  6. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,976
    Likes Received:
    10,676
    First Language:
    English
    Primarily Uses:
    RMVXA

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #6
Thread Status:
Not open for further replies.

Share This Page