Advertisement
diamondandplatinum3

Run Common Event On Continue

Jun 7th, 2014
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.66 KB | None | 0 0
  1. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. #             Run Common Event On Continue
  3. #             Author: DiamondandPlatinum3
  4. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. #  Description:
  6. #
  7. #    This script allows you to run a common event when the player loads a
  8. #     save game.
  9. #
  10. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11. #------------------------------------------------------------------------------
  12. #  Instructions:
  13. #
  14. #  ~  Modify Editable Region to your liking.
  15. #
  16. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  17.  
  18.  
  19.  
  20. #==============================================================================
  21. # ** Scene_Load
  22. #------------------------------------------------------------------------------
  23. #  This class performs load screen processing.
  24. #==============================================================================
  25.  
  26. class Scene_Load < Scene_File
  27.   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  28.   #                                                        -=
  29.   #                 Editable Region        ////            ==
  30.   #                                                        =-
  31.   #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  32.  
  33.   # The Event ID of the Common Event that will be used when the player
  34.   # loads a saved game
  35.   COMMON_EVENT_ID_TO_RUN = 10
  36.  
  37.   # Load the save file with the Screen Faded Out?
  38.   # This will allow you to set things up with the common event without
  39.   # interupting the visuals on the screen.
  40.   # Note: If true, you will need to use the "screen fadein" event when you are
  41.   #       finished with the common event.
  42.   ContinueScreenFadeout = true
  43.  
  44.   #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  45.   #                                           \/
  46.   #               End of Editable Region      /\
  47.   #                                           \/
  48.   #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  49.  
  50.   #--------------------------------------------------------------------------
  51.   # * Processing When Load Is Successful
  52.   #--------------------------------------------------------------------------
  53.   alias dp3_sceneload_onloadsuccess_09qd8uj     on_load_success
  54.   #--------------------------------------------------------------------------
  55.   def on_load_success
  56.     # Run Common Event
  57.     $game_temp.reserve_common_event(COMMON_EVENT_ID_TO_RUN)
  58.    
  59.     # Call Original Method
  60.     dp3_sceneload_onloadsuccess_09qd8uj()
  61.    
  62.     # Fadeout Screen
  63.     $game_map.screen.start_fadeout(1) if ContinueScreenFadeout
  64.   end
  65. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement