With regards to BGM and switches

So, I tried what this (could the function have changed from 7 years ago?) suggested, specifically...

"You create an event in the town. Set the first page to parallel and add "play BGM"(town bgm) and erase event. Add a second page, set the conditions to "switch 'chase' ON" and leave the page empty. Now when the chase starts you turn on the switch. When it ends you turn it off."

But the first page, with no conditions, triggers any time the player is in the room, no? Even when I then tried to make the condition on page 1, not 2, it does not work as intended, but I suppose that's because of the condition?
The reason is the post actually events it badly. Parallel events always run no matter what. It would be better to do this:

Page 1: Condition switch ON
Play BGM
Erase Event

No page 2 needed as it will never matter.
@Nereid
You never specify what effect you want to achieve.
As said above the eventing you described is a rather bad idea for several reasons.
But I'm not sure what it is supposed to achieve and as a result I think that the solution above might not fit what you want.

because any combination of erase event and switch off event is a bad idea, you usually use either-or depending on the effect you want.
I want what the OP wanted on that thread.
Page 1: Condition switch ON
Play BGM
Erase Event
If that's the same switch later used in the event, I tried it as mentioned, but the music doesn't continue on until the switch is off as desired...
define "continue"...

There is a reason why I asked you to restate in your own words what you want, because you might have misread something in the other topic. Like the context of what an event really does or requires.

In the case of the event described by Bgillisp above, you need to turn on the switch before the transfer to the map that the event is on. That will change the background music set on that map to the new BGM on the first frame after the transfer - but it still is a change, which means the BGM will restart that new music.
And due to the erase that will repeat once per entering the map as long as the switch is on.

Now - is that what you want? If not please describe in your own words what effect you want.
I want what the OP wanted on that thread.
Answers like that aren't helpful. When we ask you to describe what you want, it's to help organize your thoughts and state them clearly.

Also, when we click on the link you provided, there is no "OP," there's only a title about keeping BGM playing through transfers which also isn't a helpful amount of information. I see people talking about a chase, but there's no original description (and I'm not going to go digging through crummy Reddit organization to try to figure out what someone else is talking about for the sake of helping you 😛 )

So...what exactly do you want to have happen?

If that's literally the extent of it, that you want to transfer to a different map without the BGM changing, the dead simplest way to do that is to create another copy of that second map with no BGM specified in the map options. When you enter that, it will continue playing whatever you had. There are other, more complex solutions available via eventing, but we'd need to understand more clearly what you want.
Before the map the event is on? But I want the music to come on as soon as a condition is met, not before the player enters the map the event is on (as I have other music at that point). As it is with the above switch it turns on, but still turns off as soon as the transfer is done (i.e. no different from turning on the music manually).

There are other solutions on that page, but it seemed to me that, if it works, this would be the optimal one...
Events on maps can't run until you are on the map. You'd need that event on every map where it can turn on then, or in a common event, though common events never erase so you'd have to set it up another way.

Also if you set it up the way I suggested it will flip to it runs when the switch is ON. OFF is more complicated too as you'd need two pages but have to change what page it is on, and also can't be done as a common event anymore so you'd have to change how you set it up.
Before the map the event is on? But I want the music to come on as soon as a condition is met, not before the player enters the map the event is on
as I assumed, you completely misunderstood the topic you linked to us.
That topic was specifically targeted to continue a music that was started before a transfer through that transfer.

If you want a music to start when a condition is met, you better explain to us what that condition is supposed to handle, and where and when exactly that condition will be true.
and then the solution probably has nothing to do with what you found on the linked topic.
Events on maps can't run until you are on the map. You'd need that event on every map where it can turn on then
I'm not expecting it to start when not on the map, but I was hoping it would continue beyond a single map after it starts? How would a common event change the situation?
continue a music that was started before a transfer through that transfer.
I do want that, just after a condition is met, like with the 'chase' scenario in the topic.
I do want that, just after a condition is met, like with the 'chase' scenario in the topic.
then either you have done something other than described, or you have another event with another play bgm interfering.
please show us a screenshot of the event you made and explain exactly what happens at which time so that we can bughunt YOUR case instead of discussing the linked topic.
It's not much else, really, just another switch...
RPGMZ_gL1IFGA9yK.png
It's not much else, really, just another switch...
that event is wrong on many counts

1) NEVER chain events by switches that way. If an event does nothing but activate a switch on autorun from another switch, then it is not needed at all because you can control the other switch directly.
as such this event is completely useless and can only cause bugs, never anything you want.

2) if we ask for a screenshot, do not crop the event window, because that can remove important information. For example the page numbering or so.
just use alt-prtscrn, that will limit the screenshot to the active window and then post that un-edited.

3) I asked for the event that contains the play bgm command, the command included in any suggestion both here and in that other topic. Without a play bgm of course nothing in the music will change.

4) I not only asked for the screenshot of the event, but also for a description of what happens when the event is triggered or when you change switches and so on.
Please include that together with the correct screenshot containign the play bgm in your next post.
That's another event...
RPGMZ_oOra13FIWN.png

what happens when the event is triggered
Currently, as mentioned, it plays it, but then still stops after a transfer, so how could it not?
it plays it, but then still stops after a transfer, so how could it not?
of course it does.
If this event starts a music on one map it will never and cannot continue it after a transfer to another map, because it does not exist on that other map.
ONLY the events of the current map exist, all events on all other maps do not. So if you change maps with a transfer, all previous map events get deleted automatically.

have you even read the solution in the linked topic?
You need TWO events with play BGM, one on each map, for the BGM to continue.
I tried having play bgm on different maps originally but it simply restarts the music, which isn't what I want...
And you couldn't have said that after I specifically pointed that out several posts above?
Especially with me asking if that is what you wanted?
but it still is a change, which means the BGM will restart that new music.
And due to the erase that will repeat once per entering the map as long as the switch is on.

Now - is that what you want? If not please describe in your own words what effect you want.



That said, it is almost impossible to prevent that restart effect.
You can forget doing that by event, it will need a plugin that rewrites part of how the map transitions are handled.

and for a plugin request doing that, you'll need to specify exactly what you want in a single post, not like the mess in this topic. You need to organize your description of what you want for that, as someone else pointed out to you several posts above:
Answers like that aren't helpful. When we ask you to describe what you want, it's to help organize your thoughts and state them clearly.
No plugins currently exist?
With regards to the suggestion to create copies of maps... how would that even work when any kind of transfer, even on the same map, would reset the music?
If the map Nereid transfers to doesn't have a BGM specified in its parameters, would the BGM triggered by the event on the previous map continue? I'm almost positive it should continue.

Original thread: https://forums.rpgmakerweb.com/threads/with-regards-to-bgm-and-switches.141685/