Advertisement
Dekita

death counters

Oct 19th, 2012
869
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.02 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.0
  3. ★ Actor Death Counter™ ★
  4.  
  5. ================================================================================
  6. Script Information:
  7. ====================
  8. This script simply counts the amount of times your actors have died.
  9.  
  10. ================================================================================
  11. ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  12. ================================================================================
  13. 1. You must give credit to "Dekita"
  14. 2. You are NOT allowed to repost this script.(or modified versions)
  15. 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
  16. 4. You are NOT allowed to use this script for Commercial games.
  17. 5. ENJOY!
  18.  
  19. "FINE PRINT"
  20. By using this script you hereby agree to the above terms and conditions,
  21. if any violation of the above terms occurs "legal action" may be taken.
  22. Not understanding the above terms and conditions does NOT mean that
  23. they do not apply to you.
  24. If you wish to discuss the terms and conditions in further detail you can
  25. contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
  26.  
  27. ================================================================================
  28. History:
  29. =========
  30. D /M /Y
  31. 18/10/2o12 - wrote script,
  32. ================================================================================
  33. INSTRUCTIONS:
  34. ==============
  35. Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  36.  
  37. ================================================================================
  38. HOW DO I CHECK AN ACTORS DEATH COUNTER ?
  39. =========================================
  40. Easy, simply go to an event, and in the "control variables" section
  41. put either
  42. $game_actors[ACTOR_ID].death_counter
  43. or
  44. $game_party.members[PARTY_MEMBER_ID].death_counter
  45. under the "script" option and SET it to a game variable.
  46. then use \v[VARIABLE_ID] in the text option of an event to display that
  47. variable.
  48.  
  49. If you do not understand, you can check the demo to see this event in action.
  50. you can find the demo on my blog...
  51. http://dekitarpg.wordpress.com/
  52.  
  53. NOTE: you can also base conditional branches and shit like that on actor death counter
  54.  
  55. =end #==========================================================================#
  56. module Dekita__Actors_Death_Counter
  57.  
  58. # THERE ARE NO CUSTOMISATION OPTIONS FOR THIS SCRIPT!
  59.  
  60. p 'Loaded : DPBz - Actors Death Counter'
  61. end # Dekita__Enemy_HP_MP_BASIC
  62. #===============================================================================#
  63. # #
  64. # - CUSTOMISATION END - #
  65. # #
  66. #===============================================================================#
  67. # http://dekitarpg.wordpress.com/
  68. #===============================================================================#
  69. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  70. # YES?\.\. #
  71. # OMG, REALLY? #
  72. # WELL SLAP MY FACE AND CALL ME A DRAGON.\..\.. #
  73. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  74. #===============================================================================#
  75.  
  76. $imported = {} if $imported.nil?
  77. $imported[:Dekita__Actors_Death_Counter] = true
  78.  
  79. #==============================================================================
  80. class Game_Battler < Game_BattlerBase
  81. #==============================================================================
  82. attr_accessor :death_counter
  83.  
  84. alias death_counter_init initialize
  85. def initialize
  86. death_counter_init
  87. @death_counter = 0
  88. end
  89.  
  90. alias death_counter_die die
  91. def die
  92. death_counter_die
  93. @death_counter += 1
  94. end
  95.  
  96. end # Game_Battler < Game_BattlerBase
  97.  
  98. #==============================================================================
  99. class Game_Actor < Game_Battler
  100. #==============================================================================
  101.  
  102. alias setup_death_counter setup
  103. def setup(actor_id)
  104. setup_death_counter(actor_id)
  105. @death_counter = 0
  106. end
  107.  
  108. end # Game_Actor < Game_Battler
  109.  
  110. #===============================================================================#
  111. # - SCRIPT END - #
  112. #===============================================================================#
  113. # http://dekitarpg.wordpress.com/ #
  114. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement