One of my topics was just locked. I received an email letting me know and so I checked it out. I just wanna say thank you guys for the nostalgic good feels!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#==============================================================================
# ** Scene_Gameover Menu
#
# Made by AliveDrive
# With help from winkio and Game_Guy
#------------------------------------------------------------------------------
# This class performs game over screen processing.
#==============================================================================
VARIABLE_X = 1
VARIABLE_Y = 2
VARIABLE_MAP = 3
class Scene_Gameover
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make game over graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
@help_window = Window_Help.new
@help_window.set_text("You will lose " + ($game_party.gold / 2).to_s + " gold if you click Revive.")
# Stop playing SE, ME, BGS, and BGM
Audio.se_stop
Audio.me_stop
Audio.bgs_stop
Audio.bgm_stop
# Play game over ME
$game_system.me_play($data_system.gameover_me)
# Make command window
s0 = "Revive"
s1 = "Continue"
s2 = "Return to Title"
@command_window = Window_Command.new(192, [s0, s1, s2])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 320
# Continue enabled determinant
# Check if at least one save file exists
# If enabled, make @continue_enabled true; if disabled, make it false
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of help window
@help_window.dispose
# Dispose of command window
@command_window.dispose
# Dispose of gameover graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # Revive
command_revive
when 1 # Continue
command_continue
when 2 # Return to Title
$game_system.se_play($data_system.decision_se)
$scene = Scene_Title.new
end
end
end
#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
# If continue is disabled
unless @continue_enabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# * Command: Revive
#--------------------------------------------------------------------------
def command_revive
$game_temp.gameover = false
$game_party.gain_gold($game_party.gold / -2)
$game_party.actors.each {|a| a.recover_all}
$game_map.setup($game_temp.player_new_map_id)
$game_temp.player_transferring = true
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
return
# If battle test
if $BTEST
$scene = nil
end
end
end