I'm really struggling to save and replay BGM

chiithecat

Veteran
Veteran
Joined
Sep 14, 2019
Messages
59
Reaction score
25
First Language
Korean
Primarily Uses
RMMV
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?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,829
Reaction score
14,021
First Language
English
Primarily Uses
RMMV
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,821
Reaction score
7,887
First Language
German
Primarily Uses
RMMV
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.
 

chiithecat

Veteran
Veteran
Joined
Sep 14, 2019
Messages
59
Reaction score
25
First Language
Korean
Primarily Uses
RMMV
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?)
 
Last edited:

chiithecat

Veteran
Veteran
Joined
Sep 14, 2019
Messages
59
Reaction score
25
First Language
Korean
Primarily Uses
RMMV
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,821
Reaction score
7,887
First Language
German
Primarily Uses
RMMV
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.

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)
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,829
Reaction score
14,021
First Language
English
Primarily Uses
RMMV
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.
 

chiithecat

Veteran
Veteran
Joined
Sep 14, 2019
Messages
59
Reaction score
25
First Language
Korean
Primarily Uses
RMMV
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?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,829
Reaction score
14,021
First Language
English
Primarily Uses
RMMV
You'd need to make an event use the Replay BGM command in order to pick up where it left off after saving.
 

chiithecat

Veteran
Veteran
Joined
Sep 14, 2019
Messages
59
Reaction score
25
First Language
Korean
Primarily Uses
RMMV
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
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm moving on from RMXP finally. I've been stuck in a difficult decision between XP and MZ, and I've given up and moved on to MZ. Overall I'm really liking it, I wish tilesets were easier to setup like XP, but it's actually not that bad!
Have you ever gone full 'Ship of Theseus' while frankenspriting? Because I just did.
I saw my new eye doctor today, he reminds me of Satoru Iwata for some reason
I've been using a modified version of a script called Multiple Messages. It makes my text boxes look like a Mario & Luigi game! There is something about it that bothers me a little bit, but I shouldn't worry about that now.

Side note, Mist's walking animation is almost perfectly in sync with Loose Yourself by Eminem.
Starting work on some stuff for the community. Hopefully it will be fun, and useful to somebody.

Forum statistics

Threads
107,773
Messages
1,032,038
Members
139,915
Latest member
nick7626
Top