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,696
Reaction score
13,984
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,734
Reaction score
7,851
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,734
Reaction score
7,851
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,696
Reaction score
13,984
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,696
Reaction score
13,984
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

My computer broke yesterday, so no RPG maker for at least a week until I can get it repaired. :(
Just wanted to share how my game won 1st place in a game jam for itch.io. Everyone else used Unreal, Unity, GMS2, Godot, etc but I used RPG Maker 2003 :guffaw: It just shows that you can create a good game and it doesn't matter which engine you use
Working on cutscenes~

if your game is the first (or ONLY) in a series and still has a colon in its title, you are a bad person and I hate you...... jk.

who could ever hate BETWEEN: TWO SOULS?

Forum statistics

Threads
107,405
Messages
1,029,444
Members
139,504
Latest member
lobsterknees
Top