Advertisement
Dekita

autostart game

May 6th, 2013
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. # Snippet to bypass the title screen, usefull for testing reasons.
  2. #===============================================================================
  3. module SceneManager
  4. #===============================================================================
  5. #--------------------------------------------------------------------------
  6. # Get First Scene Class
  7. #--------------------------------------------------------------------------
  8. def self.first_scene_class
  9. $BTEST ? Scene_Battle : Scene_AutoLoadGame
  10. end
  11.  
  12. end
  13.  
  14. #===============================================================================
  15. class Scene_AutoLoadGame < Scene_Base
  16. #===============================================================================
  17. # // Start Method
  18. def start
  19. super
  20. SceneManager.clear
  21. Graphics.freeze
  22. instant_game
  23. end
  24. # // Get Save Game Data (if exists?)
  25. def instant_game
  26. if DataManager.save_file_exists?
  27. index = DataManager.last_savefile_index
  28. DataManager.load_game(index)
  29. else
  30. DataManager.setup_new_game
  31. end
  32. $game_map.autoplay
  33. SceneManager.goto(Scene_Map)
  34. end
  35.  
  36. end
  37.  
  38. #===============================================================================#
  39. # http://dekitarpg.wordpress.com/ #
  40. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement