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,822
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,813
Reaction score
7,885
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,813
Reaction score
7,885
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,822
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,822
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

FastFood in my country is neither fast nor cheap like it's expected to be, but people still buy a lot of it. I don't want to imagine how much of it people would eat if it was.
Started finishing up my bosses and characters...I don't know how long...but its going to take long...

I ended up needing to do a chapter one world map remake. It's still WIP but coming along nicely. =D
Stream will be live shortly! I will be beginning a play-through of Resident Evil 4! Feel free to drop by!

1st iteration on castle interior in Tiled.

Forum statistics

Threads
107,752
Messages
1,031,889
Members
139,894
Latest member
soicau888vip
Top