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.

Ending the victory music after the Battle report

I am trying to figure out how do end the victory music after the battle report so it does not contnue playing on the map. I am using RTAB and the battle report addon for it if it matters, just hoping if someone could point me in the right direction.
 
Following on from Granas' post, you want to put that in the RTAB / Battle report script, immediately before the line of code $scene = Scene_Map.new. If you put it there, it ought to play through the battle report, but stop as soon as the transition back to the map screen occurs.
 
I could not find the $scene = Scene_Map.new But i will post the script to show u what i got.

Code:
#==============================================================================
# ** Battle Result Window Plus (WBR+)
#------------------------------------------------------------------------------
#   A cleaner, bigger, and better organized battle result window
#==============================================================================

class Window_BattleResult < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(exp, gold, treasures)
    #Make attributes
    @exp = exp
    @gold = gold
    @treasures = treasures
    #Draw new window
    super(160, 40, 320, @treasures.size * 32 + 200)
    #Make the window's bitmap
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Verdana"
    self.contents.font.size = 22
    self.y = 160 - height / 2
    #Make the bitmap invisible
    self.visible = false
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    #Initialize string-width variables
    wx = contents.text_size("Winnings: ").width
    gx = contents.text_size(@gold.to_s + "   ").width
    tx = contents.text_size("Total: ").width
    ex = contents.text_size(@exp.to_s + " ").width
    #If you win items in battle
    if @treasures.size != 0
      #Set font color
      self.contents.font.color = system_color
      #Draw victory text
      self.contents.draw_text(0, 0, 288, 32, "Victory!", 1)
      #Make division rectangle
      self.contents.fill_rect(0, 32, 288, 2, normal_color)
      #Gold Section
      self.contents.draw_text(0, 34, 288, 32, $data_system.words.gold)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 288, 32, "Winnings: ")
      self.contents.font.color = normal_color
      self.contents.draw_text(wx, 70, 288, 32, @gold.to_s)
      @gold += $game_party.gold
      self.contents.font.color = system_color
      self.contents.draw_text(wx + gx, 70, 288, 32, "Total: ")
      self.contents.font.color = normal_color
      self.contents.draw_text(wx + gx + tx, 70, 288, 32, @gold.to_s)
      self.contents.fill_rect(0, 102, 288, 2, normal_color)
      #Experience Section
      self.contents.font.color = system_color
      self.contents.draw_text(0, 104, 288, 32, "Experience")
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 136, 288, 32, @exp.to_s)
      self.contents.font.color = system_color
      self.contents.draw_text(ex, 136, 288, 32, "Ex Points")
      #Treasures Section
      self.contents.fill_rect(0, 168, 288, 2, normal_color)
      self.contents.draw_text(0, 170, 288, 32, "Treasure")
      x = 4
      y = 202
      for item in @treasures
        draw_item_name(item, x, y)
        y += 32
      end
    #If you don't win any items...ha ha! You lose!...ahem
    else
      #Set font color
      self.contents.font.color = system_color
      #Draw victory text
      self.contents.draw_text(0, 0, 288, 32, "Victory!", 1)
      #Make division rectangle
      self.contents.fill_rect(0, 32, 288, 2, normal_color)
      #Gold Section
      self.contents.draw_text(0, 34, 288, 32, $data_system.words.gold)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 288, 32, "Winnings: ")
      self.contents.font.color = normal_color
      self.contents.draw_text(wx, 70, 288, 32, @gold.to_s)
      @gold += $game_party.gold
      self.contents.font.color = system_color
      self.contents.draw_text(wx + gx, 70, 288, 32, "Total: ")
      self.contents.font.color = normal_color
      self.contents.draw_text(wx + gx + tx, 70, 288, 32, @gold.to_s)
      self.contents.fill_rect(0, 102, 288, 2, normal_color)
      #Experience Section
      self.contents.font.color = system_color
      self.contents.draw_text(0, 104, 288, 32, "Experience")
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 136, 288, 32, @exp.to_s)
      self.contents.font.color = system_color
      self.contents.draw_text(ex, 136, 288, 32, "Ex Points")
      end
    end
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