Change Encounter Sound (via event or some such)

I have a situation where I have a encounter sound for random encounters, but I would also like to change the encounter sound before a boss fight (like the MOTHER trilogy), then back to the original encounter sound for further random encounters. How would I do this?

EDIT: Title changed for clarification (is shown to clearly be needed by post below)
You will just have to add an event command 'change battle BGM' before the battle process, and the song will play during the fight. Then you just have to add another 'change battle BGM' after the battle process in order to change to the original one.

In other words like this in a event:

Change battle BGM: 'Boss battle song'

Battle Processing: Boss number 1

Change battle BGM: 'Original battle song'
You will just have to add an event command 'change battle BGM' before the battle process, and the song will play during the fight. Then you just have to add another 'change battle BGM' after the battle process in order to change to the original one.

In other words like this in a event:

Change battle BGM: 'Boss battle song'

Battle Processing: Boss number 1

Change battle BGM: 'Original battle song'
encounter sound, not battle music.

EDIT: CLARIFICATION: when you start a battle, you get the sound effect, THEN the battle music. I want to change the sound effect to be different for the actual boss encounter, then change that for normal enemy encounters.
encounter sound, not battle music.
Ah, at battle start? That's a good question actually. Not sure if there's a way to change it, by using event commands. There might be a command to use from Game objects, might check there. Never changed the battle start sound so I'm not sure 😛

Edit: And sorry for the misunderstanding 😛
What encounter sound? I don't recall that being part of the editor.
What encounter sound? I don't recall that being part of the editor.
Maybe this will ring a few bells?

Spoiler
[IMG]http://s23.postimg.org/9k92ln9vv/BATTLE_START_SOUND.png[/IMG]
The only thing I could find is:

# Battle Start

def self.play_battle_start
play_system_sound(7)

But since It's taken from the database variable (or $data_system), there's not much to do with it.

I guess you will need to script it.
Oh ya there was something like that...


You'll have to do some scripting to change the sound used. Depending on whether it's an evented battle or a random encounter it might be more complicated.
Oh ya there was something like that...

You'll have to do some scripting to change the sound used. Depending on whether it's an evented battle or a random encounter it might be more complicated.
Well, seeing as I'm going to use it for boss battles, it will definitely be evented...
You can use script calls in events.
You can use script calls in events.
Yes, but I can't script e.e
Easiest way is to call this before the battle begins

Code:
$data_system.sounds[7] = RPG::SE.new("your_filename")
and then call this afterwards to reset it back to the old name
Code:
$data_system.sounds[7] = RPG::SE.new("old_filename")
Easiest way is to call this before the battle begins

$data_system.sounds[7] = RPG::SE.new("your_filename")and then call this afterwards to reset it back to the old name
Code:
$data_system.sounds[7] = RPG::SE.new("old_filename")
thankies very much

EDIT: Also for others that find this and want to do this after it's locked, it's best to dedicate two common events to this (one for setting to boss encounter, the other for setting it back to normal afterward)
Easiest way is to call this before the battle begins

$data_system.sounds[7] = RPG::SE.new("your_filename")and then call this afterwards to reset it back to the old name
Code:
$data_system.sounds[7] = RPG::SE.new("old_filename")
I wasn't too far off in finding the code for the script call xd (Just didn't know how you would change the SE file in varaiable 7 😛 )
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/change-encounter-sound-via-event-or-some-such.19127/