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.

Battle Victory End Music

R P G

Member

Since I have my own battle victory music and it's longer than the default ones, this is how I set it up:

      Audio.me_fade(500)
      $scene = Scene_Map.new

My problem comes when the battle ends, the victory music stops but it also stops all other background music. Like when I battle out in the world map, the music all of the sudden stops and no music at all. Can anyone help me with this?
 
Your victory music is a Melody Effect (ME), correct? Where did you implement this code of yours? Are you sure you did not include any BGM methods in your code that you have forgotten to mention? Some more detail would be useful, as the code above should not alone result in BGM not playing.
 

R P G

Member

Yeah my victory music is a ME. I know nothing about scripts and I followed the instructions from this thread:

http://www.rmxp.org/forums/index.php?topic=4002

I edited the Scene_Battle script at around line 211. I'm pretty sure I don't have any other scripts that have to do with BGMs...
And this is the area where I edited the script:

  #--------------------------------------------------------------------------
  # * End Battle
  #    result : Results (0: win, 1: escape, 2:lose)
  #--------------------------------------------------------------------------
  def battle_end(result)
    if result == 2 and not $game_troop.can_lose
      call_gameover
    else
      $game_party.clear_actions
      $game_party.remove_states_battle
      $game_troop.clear
      if $game_temp.battle_proc != nil
        $game_temp.battle_proc.call(result)
        $game_temp.battle_proc = nil
      end
      unless $BTEST
        $game_temp.map_bgm.play
        $game_temp.map_bgs.play
      end
      Audio.me_fade(500)
      $scene = Scene_Map.new
      @message_window.clear
      Graphics.fadeout(30)
    end
    $game_temp.in_battle = false
  end
 

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