Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Project2::Bestiary
- =begin
- I want you to create a script that logs the names of every enemy
- that is killed in an array.
- But I don't want the names to be repeated (.uniq)
- I want you to also keep track of how many of each type
- of enemy is killed (add new variable to Game_Enemy)
- If you go this route, however you figure out how to do it,
- I want to be able to use one method that will show me the
- enemy's name, and a count of how many times it was killed.
- =end
- module J
- def self.e_info
- p $id_track
- p $name_track
- end#def
- end#module
- class Scene_Battle
- alias j_name_id_tracker_p5 start_phase5
- def start_phase5
- j_name_id_tracker_p5
- $id_track = [] if $id_track == nil
- $name_track = [] if $name_track == nil
- for enemy in $game_troop.enemies
- $id_track.push(enemy.id)
- $name_track.push(enemy.name)
- $id_track.uniq!
- $name_track.uniq!
- end#for
- end#def
- end#class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement