Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED] death toll

Started by &&&&&&&&&&&&&, October 17, 2006, 12:56:59 PM

0 Members and 1 Guest are viewing this topic.

&&&&&&&&&&&&&

Can someoen make a scrip to show how many enemies you killed. I'm using the normal turn-based battle and I want it to say how many you killed...

&&&&&&&&&&&&&&&&

Blizzard

#1
ID = 26

class Scene_Battle

  alias main_dt_later main
  def main
    @td_flag = 0
    main_dt_later
  end
 
  alias upd_dt_later update
  def update
    @td_flag = $game_troop.enemies.size if @td_flag == 0
    upd_dt_later
  end
 
  alias battle_end_td_later battle_end
  def battle_end(result)
    battle_end_td_later(result)
    count = 0
    for enemy in $game_troop.enemies
      count += 1 unless enemy.exist?
    end
    $game_variables[ID] += @td_flag - count
  end

end


Set ID to the variable ID you want to use to store the number of killed enemies. Tell me if it works. I'm in a college lesson right now and made that out of my head, but it should work. To show the number just use in a message \v[X] where X is the same number as you set ID.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

&&&&&&&&&&&&&

&&&&&&&&&&&&&&&&