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.