# Backgrounds to show in credits. Found in Graphics/Titles/ folder
CreditsBackgroundList=["Pic_2","Black"]#Add More/Edit List
CREDITS_OUTLINE = Color.new(0,0,127, 255)
CREDITS_SHADOW = Color.new(0,0,0, 100)
CREDITS_FILL = Color.new(255,255,255, 255)
#==============================================================================
# * Scene_Credits
#------------------------------------------------------------------------------
# Scrolls the credits you make below. Original Author unknown. Edited by
# MiDas Mike so it doesn't play over the Title, but runs by calling the following:
# $scene = Scene_Credits.new
# New Edit 3/6/2007 11:14 PM by AvatarMonkeyKirby.
# Ok, what I've done is changed the part of the script that was supposed to make
# the credits automatically end so that way they actually end! Yes, they will
# actually end when the credits are finished! So, that will make the people you
# should give credit to now is: UNKOWN, MiDas Mike, and AvatarMonkeyKirby.
# -sincerly yours,
# Your Beloved
# Oh yea, and I also added a line of code that fades out the BGM so it fades
# sooner and smoother.
#==============================================================================
class Scene_Credits
# This next piece of code is the credits.
#Start Editing
CREDIT=<<_END_
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
Credits go here.
_END_
#Stop Editing
def main
#-------------------------------
# Animated Background Setup
#-------------------------------
@sprite = IconSprite.new(0,0)
@backgroundList = CreditsBackgroundList
@backgroundGameFrameCount = 0
# Number of game frames per background frame.
@backgroundG_BFrameCount = 400
@sprite.setBitmap("Graphics/Titles/"+@backgroundList[0])
#------------------
# Credits txt Setup
#------------------
credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(Graphics.width,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines[i]
# LINE ADDED: If you use in your own game, you
# should remove this line
pbSetSystemFont(credit_bitmap)
x = 0
credit_bitmap.font.color = CREDITS_OUTLINE
credit_bitmap.draw_text(0 + 2,i * 32 - 2,Graphics.width,32,line,1)
credit_bitmap.draw_text(0,i * 32 - 2,Graphics.width,32,line,1)
credit_bitmap.draw_text(0 - 2,i * 32 - 2,Graphics.width,32,line,1)
credit_bitmap.draw_text(0 + 2,i * 32,Graphics.width,32,line,1)
credit_bitmap.draw_text(0 - 2,i * 32,Graphics.width,32,line,1)
credit_bitmap.draw_text(0 + 2,i * 32 + 2,Graphics.width,32,line,1)
credit_bitmap.draw_text(0,i * 32 + 2,Graphics.width,32,line,1)
credit_bitmap.draw_text(0 - 2,i * 32 + 2,Graphics.width,32,line,1)
credit_bitmap.font.color = CREDITS_SHADOW
credit_bitmap.draw_text(0,i * 32 + 8,Graphics.width,32,line,1)
credit_bitmap.font.color = CREDITS_FILL
credit_bitmap.draw_text(0,i * 32,Graphics.width,32,line,1)
end
@trim=Graphics.height/10
@credit_sprite = Sprite.new(Viewport.new(0,@trim,Graphics.width,Graphics.height-(@trim*2)))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.z = 9998
@credit_sprite.oy = -(Graphics.height-@trim) #-430
@frame_index = 0
@last_flag = false
#--------
# Setup
#--------
#Stops all audio but background music.
pbMEStop()
pbBGSStop()
pbSEStop()
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@sprite.dispose
@credit_sprite.dispose
end
##Checks if credits bitmap has reached it's ending point
def last?
if @frame_index > (@credit_sprite.bitmap.height + Graphics.height + (@trim/2))
$scene = ($game_map) ? Scene_Map.new : nil
pbBGMFade(10)
return true
end
return false
end
#Check if the credits should be cancelled
def cancel?
if Input.trigger?(Input::C)
$scene = Scene_Map.new
return true
end
return false
end
def update
@backgroundGameFrameCount = @backgroundGameFrameCount + 1
if @backgroundGameFrameCount >= @backgroundG_BFrameCount
@backgroundGameFrameCount = 0
# Add current background frame to the end
@backgroundList = @backgroundList << @backgroundList[0]
# and drop it from the first position
@backgroundList.delete_at(0)
@sprite.setBitmap("Graphics/Titles/"+@backgroundList[0])
end
return if cancel?
return if last?
@credit_sprite.oy += 1 #this is the speed that the text scrolls. 1 is default
#The fastest I'd recomend is 5, after that it gets hard to read.
@frame_index += 1 #This should fix the non-self-ending credits
end
end