Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Music to continue playing while entering battle

This request is to enable a way to keep the BGM to play while going into battle and continue to play.

Basically an example can of how your character goes into an important conversation in the game, and suddenly a battle is about to begin, and for this battle the BGM that was playing before it began, to continue playing without restarting throughout the battle and still continue as exit the battle.

Heres a video of FF5 doing such a thing:

http://www.youtube.com/watch?v=JkAOwkjzK8o

Basically one just like it was shown in battle.

Thank you.
 
Find the method call_battle in Scene_Map, delete it, and replace it with this:
(28 is the switch number I used, but it can be changed to anything, just turn that switch on and no battle music will start)

Code:
  #--------------------------------------------------------------------------
  # * Battle Call
  #--------------------------------------------------------------------------
  def call_battle
    # Clear battle calling flag
    $game_temp.battle_calling = false
    # Clear menu calling flag
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    # Make encounter count
    $game_player.make_encounter_count
    # Memorize map BGM and stop BGM
    if $game_switches[28] == true
      $game_temp.map_bgm = $game_system.playing_bgm
      $game_system.bgm_stop
      # Play battle start SE
      $game_system.se_play($data_system.battle_start_se)
      # Play battle BGM
      $game_system.bgm_play($game_system.battle_bgm)
    end
    # Straighten player position
    $game_player.straighten
    # Switch to battle screen
    $scene = Scene_Battle.new
  end

Tell me if you find any problems with it :)
 
Okay I pasted it on there.

I'm kinda not sure how to work it though, like how turn switch 28 on.

I'm kinda new at this sorry, but can you give me a step by step on how to activate it.
 
Well I switched 28 on, and then I played the music. I went into battle, and still nothing.

I'm not too sure if i'm doing something wrong or not, i'll post screenshots if this proceeds.

One question though, am I to turn on 28 on the map or if it else where?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top