neutale

Save BGS

Jan 27th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.60 KB | None | 0 0
  1. #===============================================================================
  2. # 2018/08/05 kido0617
  3. # http://kido0617.github.io/
  4. # Feel free to use
  5. # Credit is not necessary
  6. # Use the following script call
  7. # Save BGS: $game_system.save_bgs
  8. # Replay BGS: $game_system.replay_bgs
  9. #
  10. # Ver.1.0
  11. #-------------------------------------------------------------------------------
  12.  
  13. class Game_System
  14.  
  15.   alias myinit initialize
  16.   def initialize
  17.     myinit
  18.     @saved_bgs = nil
  19.   end
  20.  
  21.   def save_bgs
  22.     @saved_bgs = RPG::BGS.last
  23.   end
  24.  
  25.   def replay_bgs
  26.     @saved_bgs.replay if @saved_bgs
  27.   end
  28. end
Add Comment
Please, Sign In to add comment