#=============================================================================== # Credits # By Jet10985 (Jet) #=============================================================================== # This script will allows you to have a scene with a list of credits rolling # from the bottom of the screen up. # This script has: 4 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== =begin To call credits: Use the following in an event's Script... command $scene = Scene_Credits.new(return_scene) return_scene = The name of the scene the credits will go to after rolling. this should be in quotes, like: $scene = Scene_Credits.new("Scene_Title") would go to the title screen or $scene = Scene_Credits.new("Scene_Map") would go to the map you don't HAVE to include return_scene at all, like so: $scene = Scene_Credits.new this would go to the title screen after finishing. -------------------------------------------------------------------------------- Adding an image: To add an image that scrolls with the credits, in the config below, put the image name between img tags: Note: images should have their own line as to avoid overlapping text. =end module JetCredits # This is the text that will be displayed for the credits rolling. # Stay within the { and the } CREDITS_TEXT = %Q{ Credits Scripts - _________ Jet - Credit Script Others - ________ Jet - Being cools and everything yo AND FINALLY, THE ONE, THE ONLY Jet - he is just too hawt not to credit } # Do you want to center the text in the screen? CENTER_CREDITS_TEXT = true # Are the credits skippable with a button? SKIP_CREDITS_WITH_BUTTON = true # This is the button then can press if they want to skip the credits. SKIP_CREDITS_BUTTON = Input::C end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #============================================================================== class Scene_Credits < Scene_Base include JetCredits def initialize(return_scene = "Scene_Title") @return_scene = return_scene end def start create_menu_background @text = CREDITS_TEXT q = CENTER_CREDITS_TEXT ? 1 : 0 line_index = 0 @text.each_line {|s| if s[//i].nil? line_index += 1 else line_index += (Cache.picture($1).height / 24.0).round end } @credits = Window_Base.new(0, 416, 544, line_index * 24 + 32) @credits.opacity = 0 line_index = 0 @text.each_line {|s| text_to_draw = s.gsub("\n"){|h| "" } if text_to_draw[//i].nil? @credits.contents.draw_text(0, line_index * 24, 514, 24, text_to_draw, q) line_index += 1 else f = Cache.picture($1) x = q == 1 ? 544 / 2 - (f.width / 2.0) : 0 @credits.contents.blt(x, line_index * 24, f, f.rect) line_index += (f.height / 24.0).round end } end def update super loop do Graphics.update Input.update @credits.y -= 1 if SKIP_CREDITS_WITH_BUTTON if Input.trigger?(SKIP_CREDITS_BUTTON) break end end break if @credits.y <= @credits.height * -1 end eval("$scene = #{@return_scene}.new") end def terminate super dispose_menu_background @credits.dispose end end