Author: Azuaya
Version: 1.1 (Current)
Scene_Credit script. Plug & Play
Updates:v1.0 : First released
v1.1 : Does not require Vocab stuff no more... and fixed a few things
1. Use the Custom Menu Script made by Woratana. Located here -->
http://www.rpgrevolution.com/forums/?showtopic=117052. Add Woratana's Credit Script. Located here --->
http://www.rpgrevolution.com/forums/?showtopic=13633 Then go all the way to the bottom of the script and change class Scene_Map < Scene_Base
TO Scene_Credits < Scene_Base
3. Add a new command, COMMAND[3] = ['Credits', '$scene = Scene_Credits.new'] in Wora's Custom Menu Script.
4. Insert this script above Woratana's Custom Menu Script.
CODE
#==============================================================================
# ** Scene_Credits by Azuaya
#------------------------------------------------------------------------------
# This section shows options of starting credit, terminating it and back to title.
#==============================================================================
class Scene_Credits < Scene_Base
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
create_graphic # Create graphic
create_command_window # Create command window
play_music # Play selected music
end
#--------------------------------------------------------------------------
# * Post-Start Processing
#--------------------------------------------------------------------------
def post_start
super
open_command_window
end
#--------------------------------------------------------------------------
# * Pre-termination Processing
#--------------------------------------------------------------------------
def pre_terminate
super
close_command_window
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_command_window
snapshot_for_background
dispose_graphic
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0 #Show Credit
command_start_credits
when 1 #Close Credit
command_terminate
when 2 #Back to Title
command_to_title
end
end
end
#--------------------------------------------------------------------------
# * Create Graphic
#--------------------------------------------------------------------------
def create_graphic
@sprite = Sprite.new
@sprite.bitmap = Cache.system("Credit") #Add an image in System for Credit
end
#--------------------------------------------------------------------------
# * Dispose Graphic
#--------------------------------------------------------------------------
def dispose_graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = "Start Credit"
s2 = "Terminate"
s3 = Vocab::to_title
@command_window = Window_Command.new(172, [s1, s2, s3])
@command_window.x = ( 915 - @command_window.width) / 2
@command_window.y = 280
@command_window.opacity = 255
@command_window.openness = 0
@command_window.open
end
#--------------------------------------------------------------------------
# * Dispose of Command Window
#--------------------------------------------------------------------------
def dispose_command_window
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Open Command Window
#--------------------------------------------------------------------------
def open_command_window
@command_window.open
begin
@command_window.update
Graphics.update
end until @command_window.openness == 255
end
#--------------------------------------------------------------------------
# * Close Command Window
#--------------------------------------------------------------------------
def close_command_window
@command_window.close
begin
@command_window.update
Graphics.update
end until @command_window.openness == 0
end
#--------------------------------------------------------------------------
# * Play Music
#--------------------------------------------------------------------------
def play_music
Audio.bgm_play(" " , 100, 100) #Add BGM and it will play that BGM
RPG::BGS.stop
RPG::ME.stop
end
#-----------------------------------------
# * Show Credit
#-----------------------------------------
def command_start_credits
$scene.credit.start
close_command_window
open_command_window
end
#-----------------------------------------
# * End Credit
#-----------------------------------------
def command_terminate
$scene.credit.terminate
end
#--------------------------------------------------------------------------
# * Back to Title
#--------------------------------------------------------------------------
def command_to_title
$scene = Scene_Title.new
close_command_window
end
end
6. Now test it and enjoy your credit at different screen!
NOTE: Look at the script one more time. It requires a picture named "Credit" in Graphic\System folder. Also you can add a BGM in there.
Look for this line.
CODE
Audio.bgm_play(" " , 100 100)
CREDITS: Woratana as he is a cool scripter
This post has been edited by Azuaya: May 29 2009, 05:59 PM