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.

[FILLED] Battle Count

Vash

Member

Pretty much there would be a battle count in the menu. Everybody should know what a battle count is (everytime there is abttle the count goes up). I have been using this script but it causes some problems with other script and want a script that works on its own but cause no problems.
 
Code:
class Game_Party
  attr_accessor :battle_count
  alias seph_battlecount_gmprty_init initialize
  def initialize
    seph_battlecount_gmprty_init
    @battle_count = 0
  end
end

class Scene_Battle
  alias seph_battlecount_scnbtl_main main
  def main
    $game_party.battle_count += 1
    seph_battlecount_scnbtl_main
  end
end

That's basically it. It will increase the battle count everytime you enter a battle. You just have to do something to display the battle count.

$game_party.battle_count
 

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