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.

If BGM = Current music, no restart

(Maybe this has been solved elsewhere, but I couldn't find it)

Basically in older versions of RM if the music that was already playing in your map, then you went to a battle scene while the Battle Music is the same as the one playing in your map, the Music would not restart, it'd keep going, and also adjust it's volume or tempo to the battle music.

Is there an easy way to set up this fix in the script scenes?
 
You could do it like this:
Find these lines in Scene_MapL
Code:
#--------------------------------------------------------------------------
  # * Switch to Battle Screen
  #--------------------------------------------------------------------------
  def call_battle
    @spriteset.update
    Graphics.update
    $game_player.make_encounter_count
    $game_player.straighten
    $game_temp.map_bgm = RPG::BGM.last
    $game_temp.map_bgs = RPG::BGS.last
    RPG::BGM.stop
    RPG::BGS.stop
    Sound.play_battle_start
    $game_system.battle_bgm.play
    $game_temp.next_scene = nil
    $scene = Scene_Battle.new
  end
And change them to this
Code:
#--------------------------------------------------------------------------
  # * Switch to Battle Screen
  #--------------------------------------------------------------------------
  def call_battle
    @spriteset.update
    Graphics.update
    $game_player.make_encounter_count
    $game_player.straighten
    $game_temp.map_bgm = RPG::BGM.last
    $game_temp.map_bgs = RPG::BGS.last
    unless $game_temp.map_bgm == $game_system.battle_bgm
      RPG::BGM.stop
    end
    RPG::BGS.stop
    Sound.play_battle_start
    if $game_system.battle_bgm != $game_temp.map_bgm
      $game_system.battle_bgm.play
    end
    $game_temp.next_scene = nil
    $scene = Scene_Battle.new
  end
that does not include volume and tempo changes though, but they're probably easy to do as well
 

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