brainstorm
Member
Alright while scripting I found an easy way to make a cool looking Credits Script that looks like it's part of the title graphic. Look at in in action...
Script ~
Instructions ~

Script ~
[rgss]
#===============================================================================
# * Credits Menu
#-------------------------------------------------------------------------------
# A credits menu that scrolls up the Title Screen. Useful for a professional
# looking game.
#===============================================================================
class Window_Scroll < Window_Base
attr_accessor :credits
def initialize
super(0,0,640,480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.back_opacity = 0
initcredit
refresh
end
def initcredit
#PUT Credits HERE
@credits = Hash.new("")
@credits[0] = "~Script by:"
@credits[1] = "SASUKE89"
end
def refresh
self.contents.clear
self.contents.font.color = Color.new(38,38,38)
self.contents.font.size = 12
self.contents.font.name = 'PT Taj Mahal'
for i in 0...@credits.size
self.contents.draw_text(0, 0, 480, (i * 32) + 32, @credits.to_s)
end
end
end
class Scene_Title
alias s89main main
alias s89update update
def main
s89main
@scroll_window.dispose
end
def update
@scroll_window.update
s89update
end
end
[/rgss]
#===============================================================================
# * Credits Menu
#-------------------------------------------------------------------------------
# A credits menu that scrolls up the Title Screen. Useful for a professional
# looking game.
#===============================================================================
class Window_Scroll < Window_Base
attr_accessor :credits
def initialize
super(0,0,640,480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.back_opacity = 0
initcredit
refresh
end
def initcredit
#PUT Credits HERE
@credits = Hash.new("")
@credits[0] = "~Script by:"
@credits[1] = "SASUKE89"
end
def refresh
self.contents.clear
self.contents.font.color = Color.new(38,38,38)
self.contents.font.size = 12
self.contents.font.name = 'PT Taj Mahal'
for i in 0...@credits.size
self.contents.draw_text(0, 0, 480, (i * 32) + 32, @credits.to_s)
end
end
end
class Scene_Title
alias s89main main
alias s89update update
def main
s89main
@scroll_window.dispose
end
def update
@scroll_window.update
s89update
end
end
[/rgss]
Instructions ~
Error says "undefined method `update' for nil:NilClass"":24as5vq4 said:To fix this error go to the original Scene_Title and add this after line 43 :"@scroll_window = Window_Scroll.new"
To add credits to the script all you have to do is find the part of the script that says:
After :"@credits[1] = "SASUKE89"" add a new line and insert :"@credits[Following #] = "Credits Name"". Where "Following #" is put the number that follows the credit number thats on the line before the line you are on.
Code:
#PUT Credits HERE
@credits = Hash.new("")
@credits[0] = "~Script by:"
@credits[1] = "SASUKE89"
After :"@credits[1] = "SASUKE89"" add a new line and insert :"@credits[Following #] = "Credits Name"". Where "Following #" is put the number that follows the credit number thats on the line before the line you are on.
Does that current font clash with your title graphic? Here's your tutorial on how to fix that.
Changing Font Size":24as5vq4 said:To change the font size find the following line :"self.contents.font.size =" and change the number that follows.
self.contents.font.color = Color.new(38,38,38)
self.contents.font.size = 12
self.contents.font.name = 'PT Taj Mahal'
Changing Font Color":24as5vq4 said:To change the font color find the following line :"self.contents.font.color = Color.new" and change the three numbers that follow. To find a new color go in Paint or any other photo editing software and copy the Red Green and Blue values and put them in the script.
Changing Font":24as5vq4 said:To change the font find the following line :"self.contents.font.name = " and change the name of the font that follows