Play a BGM only once

Hello👋

I would like to know if it was possible to play a BGM only once, and if so, how?
Play the BGM in an event and then activate a self-switch.

Greetings,
Tw0Face
That won't work, play BGM event loops music when it's started.
I don't know very well RMMV JavaScript syntax, but you can try do something like this.

#1 Use This calculator to Get number of frames your BGM music
#2 In event which starts play BGM add from 3rd Tab action script and paste this:
Code:
var duration = paste here your result from calculator
this.wait(duration)
#3 And at the end of Action list add
Play BGM and select (none) from list.
Or just play it as a sound effect or something.
Or just play it as a sound effect or something.
Oh... That's a really good one, I didn't think about it that way...
I'd reckon playing it as an "ME" (Music Event) would be better.
I looked for something complicated when the solutions were very simple! Thank you very much. 😠
Just play it as an ME (Music Effect). It's easier that way.

Original thread: https://forums.rpgmakerweb.com/threads/play-a-bgm-only-once.103649/