CyberForte

DoW Victory ME

Oct 10th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.17 KB | None | 0 0
  1. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
  2. #_/    ◆      Forced Victory ME Stop - KGC_ForceStopVictoryME      ◆ VX ◆
  3. #_/    ◇                Last update : 2008/03/02                        ◇
  4. #_/    ◆               Translated by Mr. Anonymous                      ◆
  5. #_/   ◆ http://ytomy.sakura.ne.jp/                                            ◆
  6. #_/-----------------------------------------------------------------------------
  7. #_/  Forces Battle Victory ME (Musical Effect) to stop when the scene returns
  8. #_/  to the map.
  9. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
  10.  
  11. #==============================================================================#
  12. #                            ★ Customization ★                                 #
  13. #==============================================================================#
  14.  
  15. module KGC
  16. module ForceStopVictoryME
  17.   # ◆ Fade out time (milli-second)
  18.   #  If set to 0, the ME stops instantly upon scene change to map.
  19.   FADE_TIME = 120
  20. end
  21. end
  22.  
  23. #------------------------------------------------------------------------------#
  24.  
  25. $imported = {} if $imported == nil
  26. $imported["ForceStopVictoryME"] = true
  27.  
  28. #==============================================================================
  29. # ■ Scene_Battle
  30. #==============================================================================
  31.  
  32. class Scene_Battle < Scene_Base
  33.   #--------------------------------------------------------------------------
  34.   # ● End Battle
  35.   #     result : 結果 (0:Victory 1:Escape 2:Defeat)
  36.   #--------------------------------------------------------------------------
  37.   alias battle_end_KGC_ForceStopVictoryME battle_end unless $@
  38.   def battle_end(result)
  39.     battle_end_KGC_ForceStopVictoryME(result)
  40.  
  41.     return if result != 0
  42.  
  43.     @@_victory_me_thread = Thread.new {
  44.       time = KGC::ForceStopVictoryME::FADE_TIME
  45.        RPG::ME.fade(time)                         # Start ME Fade
  46.        sleep(time / 1000.0)                       # Wait until the fade is done.
  47.        RPG::ME.stop                               # Stop ME                      
  48.     }
  49.   end
  50. end
Advertisement
Add Comment
Please, Sign In to add comment