Wait to play BGM until a SE is played

Hello, I would like to make my battle start SE work just like a ME.
The fact is because I would like to have the battle start theme not overlap the music.
I've tried adding sleep in the se battle start function but the game freezes for that time.
Is it possible? Thank you in advance!
I'm not quiiiite sure what you did, because I don't know what "sleep" is.
Is that the name of the SE sound you are trying to play on a battle start?

What do you mean exactly by "battle start function"? Do you mean the System settings in your RPG engine?

If all you did was add the sound file you want in the SE folder, and tried using it in the System settings, it shouldn't freeze your game. There might be another cause for the game freezing.

If you're interested in plugins, SRDude has a plugin that allows you to customize a Battle Start sequence for each frame.
Ah yeah, I rewrite, I would like to make play the "Battle Start SE" of RPG MAKER XP just like a ME. The battle theme should be starting right after the play of the SE.
The sleep function is a code I added in the system script but sleep make freeze the game until the SE is played.
That's cool the link you posted but I don't think it is compatible with RPG MAKER XP
Without using a script that utilizes a different audio library (e.g. FMod), there's nothing built-in RMXP that does this. The closest you can get would be to make your sound effect be a music effect instead. Then, locate def call_battle in Scene_Map and make this slight change:
Code:
    # Play battle start SE
    # $game_system.se_play($data_system.battle_start_se)
    $game_system.me_play($data_system.battle_start_se)
There's somewhat of a delay between an ME finishing and BGM starting, hence why I said "closest".
Aaah you're right, this was a clear solution but I couldn't figure out, I'm trying now, thanks!
It works, thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/wait-to-play-bgm-until-a-se-is-played.153452/