cocicookie
Member
This is my first script that works, and it's only a simple script that adds a menu to the gameover screen that allows the player to choose between loading a game (which goes back to the title menu, aswell as playing that music) going to the title screen and shutting down.
Copy and paste into a new script in the 'Materials' section.
http://i231.photobucket.com/albums/ee20 ... Script.png[/img]
Copy and paste into a new script in the 'Materials' section.
http://i231.photobucket.com/albums/ee20 ... Script.png[/img]
Code:
#============================================================================
# VX Scene_Gameover edit by CociCookie
#----------------------------------------------------------------------------
# Includes a menu on the Game Over screen for loading or going to title
#============================================================================
class Scene_Gameover
def create_command_window
s1 = Vocab::continue
s2 = Vocab::to_title
s3 = Vocab::shutdown
@command_window = Window_Command.new(172, [s1, s2, s3])
@command_window.x = (544 - @command_window.width) / 2
@command_window.y = 288
@command_window.openness = 255
end
# -----
def start
super
RPG::BGM.stop
RPG::BGS.stop
$data_system.gameover_me.play
Graphics.transition(120)
Graphics.freeze
create_gameover_graphic
create_command_window
end
# -----
def update
super
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0 #Load Game
$scene = Scene_File.new(false, true, false)
close_command_window
when 1 #To Title
$scene = Scene_Title.new
close_command_window
when 2 #Shutdown
$scene = nil
Graphics.fadeout(120)
end
end
# -----
def close_command_window
@command_window.close
begin
@command_window.update
Graphics.update
end until @command_window.openness == 0
end
end
end