Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # Credits - Image Edit
- # By Jet10985 (Jet) - By Zetu
- #===============================================================================
- # 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.
- =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
- module Z # For Edits made by Zetu
- module Cred
- IMAGES = [
- #[Name, x, y] Remeber, y = (line number - 1) * 24
- ["imagename", 288, 48]
- ] # DO NOT REMOVE!
- def self.draw_pic(filename, x, y)
- bitmap = Cache.picture(filename)
- rect = Rect.new(0, 0, 0, 0)
- rect.width = bitmap.width
- rect.height = bitmap.height
- self.contents.blt(x, y, bitmap, rect)
- bitmap.dispose
- end
- end
- 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|
- line_index += 1
- }
- @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| "" }
- @credits.contents.draw_text(0, line_index * 24, 514, 24, text_to_draw, q)
- line_index += 1
- }
- for image in Z::CRED::IMAGES
- filename, x, y = image
- Z::CRED::draw_pic(filename, x, y)
- 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
Advertisement
Add Comment
Please, Sign In to add comment