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.

HBGames

First of all, I know this has been asked 99999 times, but the answers turned up in the search function don't work at all for me.

Code:
class Scene_Map

  def call_battle

    $game_temp.battle_calling = false

    $game_temp.menu_calling = false

    $game_temp.menu_beep = false

    $game_player.make_encounter_count

    $game_temp.map_bgm = $game_system.playing_bgm

    if !$game_switches[10] # Change 10 to the switch for keeping current music

      $game_system.bgm_stop

    end

    $game_system.se_play($data_system.battle_start_se)

    if !$game_switches[10] # Change 10 to the switch for keeping current music

      $game_system.bgm_play($game_system.battle_bgm)

    end

    $game_player.straighten

    $scene = Scene_Battle.new

  end

end

That is the code that seems to work for everyone else, but does nothing for me. I turn the switch ON, yet I get no change in the battle music playing or not. Yes, I've changed the [10] to the switch I'm using, and yes the script is placed above Main. Is there something I'm missing here? I'd have put this in the scripts forum, but the original answers where on this one, so I posted it here. Feel free to move it if it's in the wrong place.

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