SHARE
TWEET

Untitled

a guest Aug 19th, 2017 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Project2::Bestiary
  2.  
  3. =begin
  4. I want you to create a script that logs the names of every enemy
  5. that is killed in an array.
  6.  
  7. But I don't want the names to be repeated (.uniq)
  8.  
  9. I want you to also keep track of how many of each type
  10. of enemy is killed (add new variable to Game_Enemy)
  11.  
  12. If you go this route, however you figure out how to do it,
  13. I want to be able to use one method that will show me the
  14. enemy's name, and a count of how many times it was killed.
  15. =end
  16. module J
  17.   def self.e_info
  18.     p $id_track
  19.     p $name_track
  20.   end#def
  21. end#module
  22.  
  23. class Scene_Battle
  24.  
  25.     alias j_name_id_tracker_p5 start_phase5
  26.     def start_phase5
  27.       j_name_id_tracker_p5
  28.      
  29.       $id_track = [] if $id_track == nil
  30.       $name_track = [] if $name_track == nil
  31.       for enemy in $game_troop.enemies
  32.         $id_track.push(enemy.id)
  33.         $name_track.push(enemy.name)
  34.         $id_track.uniq!
  35.         $name_track.uniq!
  36.       end#for
  37.     end#def
  38. end#class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top