I'm really struggling to save and replay BGM

● ARCHIVED · READ-ONLY
Started by chiithecat 10 posts View original ↗
  1. Hey..........
    I'm working on saving and replaying bgm and it doesn't work at all.

    Currently, I'm using another map to save and load game files.
    For example, when I click on an object, I'm transported to the map where I can save files, and after saving, I'm transported to the map and position where I left.
    There is a bgm played, and whether I set it as the default bgm of the map or an event, it doesn't replay when I'm back at the map from saving.
    I save bgm, fade it out, go to another map to save file, come back, and replay bgm.
    Why isn't it working?
    Do I need to save bgm at a certain moment before or after other events run?
    Or can't I go to another map to replay the saved bgm?
  2. You shouldn't need to save and replay. If you have the BGM set in the map properties, it should just start playing again when you return to the map.
  3. as said above this should happen automatically.
    if it doesn't for you, then maybe something is wrong with how you transfer and usse the bgm commands?
    please show screenshota of what you're doing.
  4. Shaz said:
    You shouldn't need to save and replay. If you have the BGM set in the map properties, it should just start playing again when you return to the map.
    Yes the bgm is played when I come back, but from the start.
    The problem is... the bgm is not just music. Another character is playing an instrument and I find it awkward that the music replays from the beginning every time I save.
    Can I make the music replay from the point where I stopped it to save file?
    (and isn't this what 'save bgm' is for?)
  5. Andar said:
    as said above this should happen automatically.
    if it doesn't for you, then maybe something is wrong with how you transfer and usse the bgm commands?
    please show screenshota of what you're doing.
    I would really like to, but my rpg mv is in another language and I don't know how to change it.
    Also while figuring out how to do this, I separated the process to a whole set of events and it's kind of hard for other people to understand what's going on.
    Can you tell me how to do it? Then I can try it and take screenshots of the events I made as told.
  6. chiithecat said:
    I separated the process to a whole set of events
    that could be the reason.
    one of the primary rules is that no process should be distributed over multiple events, because that will introduce timing problems into the sequence. You might want to follow the link to the bughunting tutorial in my signature to learn why this is usually a bad idea.

    chiithecat said:
    my rpg mv is in another language and I don't know how to change it.
    we could tell you how, it is relatively easy but depends on whether you use the steam version or the standalone version. steam has its program properties, the standalone uses a locale file to check for different languages.
    and in a lot of cases the event screenshots are readable even if in a different language, because there are only a limited number of event commands and structures (although for complex events, english would be preferable)
  7. Try this ...

    Instead of using a Save BGM command, do Control Variables, and set a variable you haven't used yet (and name it), to AudioManager.saveBgm()

    Then when coming back to the map, instead of doing a Replay BGM, do the following in a script call: AudioManager.replayBgm($gameVariables.value(id))

    replacing id with the variable number, with no leading zeros.

    I'm not sure if this will work - there is a save of BGM as part of the save process, but it seems to be updating different variables.

    If this does not work, please post a screenshot of the map properties for the current map as well as the save map, and a screenshot of the events that do the saving and replaying of the BGM. Don't crop anything away from the map properties and event window.
  8. Shaz said:
    Try this ...

    Instead of using a Save BGM command, do Control Variables, and set a variable you haven't used yet (and name it), to AudioManager.saveBgm()

    Then when coming back to the map, instead of doing a Replay BGM, do the following in a script call: AudioManager.replayBgm($gameVariables.value(id))

    replacing id with the variable number, with no leading zeros.

    I'm not sure if this will work - there is a save of BGM as part of the save process, but it seems to be updating different variables.

    If this does not work, please post a screenshot of the map properties for the current map as well as the save map, and a screenshot of the events that do the saving and replaying of the BGM. Don't crop anything away from the map properties and event window.
    Thanks a lot! I'll try it!!
    When using the variables to save bgm, does the bgm have to be set default to the map? or should I make an event play it?
  9. You'd need to make an event use the Replay BGM command in order to pick up where it left off after saving.
  10. Shaz said:
    You'd need to make an event use the Replay BGM command in order to pick up where it left off after saving.
    I was kind of avoiding this problem since it took me so much time the last time I tried to fix it.
    Today I finally tried your method and it worked perfectly!!
    Thank you so much!! :D