The RPG Maker Resource Kit

Other Game Creation => Game Creation General Chat => Topic started by: J. Wagner on March 08, 2007, 11:17:55 PM

Title: Keeping Field BGM during fights
Post by: J. Wagner on March 08, 2007, 11:17:55 PM
I've seen in several games where field music keeps playing, even through battle.  This normally takes place when you are running from enemies, in endless battles, and so forth.  However, I set the Battle BGM to (None), and looked over the code, and I can't seem to find where it ends the music and calls the battle music.  Does anyone know how to do this?

[I've also tried SEARCH, but I couldn't seem to find anything.  Sorry if it exists.]
Title: Re: Keeping Field BGM during fights
Post by: TeaBag on March 08, 2007, 11:29:50 PM
insted of setting the battle music to 'none' set it to whatever the current field music is (the victory music too.)  you can then change the victory and battle music to whatever you want ingame using events  :)
Title: Re: Keeping Field BGM during fights
Post by: J. Wagner on March 08, 2007, 11:35:01 PM
Okay
I tried that, and it just repeats the same song from the start on each transition
then goes back to the field and plays where it left off

what I'm trying to do is find a way to get it to play straight through without a break
Title: Re: Keeping Field BGM during fights
Post by: Falcon on March 08, 2007, 11:36:49 PM
It's a very easy script, I have it in my game.

I'll post it tonight or tommrow.
Title: Re: Keeping Field BGM during fights
Post by: J. Wagner on March 08, 2007, 11:52:02 PM
Quote from: Darklord on March 08, 2007, 11:36:49 PM
It's a very easy script, I have it in my game.

I'll post it tonight or tommrow.

Thanks so much.
I didn't see anything in it, and I'm still learning the scripting language, so I figured I'd come here so I can see how the code works by looking at scripts others have. :)
Title: Re: Keeping Field BGM during fights
Post by: Blizzard on March 09, 2007, 10:17:51 AM
In Scene_Map, in def call_battle, just remove this line:

$game_system.bgm_play($data_system.battle_bgm)

You can press CTRL+F for current script search or CTRL+SHIFT+F for global script search in the editor.
Title: Re: Keeping Field BGM during fights
Post by: J. Wagner on March 09, 2007, 08:50:19 PM
Quote from: Blizzard on March 09, 2007, 10:17:51 AM
In Scene_Map, in def call_battle, just remove this line:

$game_system.bgm_play($data_system.battle_bgm)

You can press CTRL+F for current script search or CTRL+SHIFT+F for global script search in the editor.

that pretty much did it
I just had to go up a few lines and disable
$game_system.bgm_stop
to get it to actually not stop the field bgm
Title: Re: Keeping Field BGM during fights
Post by: Falcon on March 09, 2007, 10:04:02 PM
Only problem with that is if you want to have a special boss battle fight, it can't use it =/

Basically in my game I have a switch that turns it on and off, do you want that, or is Blizzard's way good enough?
Title: Re: Keeping Field BGM during fights
Post by: J. Wagner on March 10, 2007, 05:49:48 PM
Quote from: Darklord on March 09, 2007, 10:04:02 PM
Only problem with that is if you want to have a special boss battle fight, it can't use it =/

Basically in my game I have a switch that turns it on and off, do you want that, or is Blizzard's way good enough?

Right now it never plays the BGM
So I guess I want to try your way...
After all, I don't want it to always not contain Battle BGM :)
Title: Re: Keeping Field BGM during fights
Post by: Blizzard on March 11, 2007, 02:46:28 PM
Then just use

if $game_switches[ID]
  $game_system.bgm_stop
  $game_system.bgm_play($data_system.battle_bgm)
  $game_switches[ID] = false
end


Change ID to the switch ID you're gonna use. Turn on the switch and the battle BGM WILL be played. It will automatically be turned off after that.