sorry it took so long but I had some problems
anyway here is the script
#==============================================================================
# ** Scene_Gameover
#------------------------------------------------------------------------------
# This class performs game over screen processing.
#==============================================================================
class Scene_Gameover
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make game over graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
# Stop BGM and BGS
$game_system.bgm_stop
# Play game over ME
$game_system.me_play($data_system.gameover_me)
# Execute transition
Graphics.transition(120)
for c in 0..300
end
if $game_temp.lost_battle
s1 = "Continue"
s2 = "Back to Title"
s3 = "Shutdown"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
end
# 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 game over graphic
@sprite.bitmap.dispose
@sprite.dispose
# Execute transition
Graphics.transition(40)
# Prepare for transition
Graphics.freeze
# If battle test
if $BTEST
$scene = nil
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
if $game_temp.lost_battle
# If C button was pressed
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0
start_battle
when 1
to_title
when 2
shut_down
end
end
else
if Input.trigger?(Input::C)
# Switch to title screen
$scene = Scene_Title.new
end
end
end
def start_battle
# Play decision Battle BGM and Stop ME
$game_system.bgm_play($game_system.battle_bgm)
$game_system.me_play(nil)
for i in 0..$game_party.actors.size - 1
$game_party.actors[i].hp = $game_party.actors[i].maxhp
$game_party.actors[i].sp = $game_party.actors[i].maxsp
end
$game_temp.gameover = false
$game_temp.lost_battle = false
$game_party.add_lost_point
# Play battle Battle start SE
$game_system.se_play($data_system.battle_start_se)
$game_player.straighten
@command_window.dispose
$scene = Scene_Battle.new
end
def to_title
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Switch to title screen
@command_window.dispose
$scene = Scene_Title.new
end
def shut_down
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
end
class Scene_Battle
def update
# If battle event is running
if $game_system.battle_interpreter.running?
# Update interpreter
$game_system.battle_interpreter.update
# If a battler which is forcing actions doesn't exist
if $game_temp.forcing_battler == nil
# If battle event has finished running
unless $game_system.battle_interpreter.running?
# Rerun battle event set up if battle continues
unless judge
setup_battle_event
end
end
# If not after battle phase
if @phase != 5
# Refresh status window
@status_window.refresh
end
end
end
# Update system (timer) and screen
$game_system.update
$game_screen.update
# If timer has reached 0
if $game_system.timer_working and $game_system.timer == 0
# Abort battle
$game_temp.battle_abort = true
end
# Update windows
@help_window.update
@party_command_window.update
@actor_command_window.update
@status_window.update
@message_window.update
# Update sprite set
@spriteset.update
# If transition is processing
if $game_temp.transition_processing
# Clear transition processing flag
$game_temp.transition_processing = false
# Execute transition
if $game_temp.transition_name == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$game_temp.transition_name)
end
end
# If message window is showing
if $game_temp.message_window_showing
return
end
# If effect is showing
if @spriteset.effect?
return
end
# If game over
if $game_temp.gameover
$game_temp.lost_battle = true
# Switch to game over screen
$scene = Scene_Gameover.new
return
end
# If returning to title screen
if $game_temp.to_title
# Switch to title screen
$scene = Scene_Title.new
return
end
# If battle is aborted
if $game_temp.battle_abort
# Return to BGM used before battle started
$game_system.bgm_play($game_temp.map_bgm)
# Battle ends
battle_end(1)
return
end
# If waiting
if @wait_count > 0
# Decrease wait count
@wait_count -= 1
return
end
# If battler forcing an action doesn't exist,
# and battle event is running
if $game_temp.forcing_battler == nil and
$game_system.battle_interpreter.running?
return
end
# Branch according to phase
case @phase
when 1 # pre-battle phase
update_phase1
when 2 # party command phase
update_phase2
when 3 # actor command phase
update_phase3
when 4 # main phase
update_phase4
when 5 # after battle phase
update_phase5
end
end
end
I know it's long thats coz I had to edit the battle scene just to add this $game_temp.lost_battle = true
if $game_temp.gameover
[COLOR=Red]$game_temp.lost_battle = true[/COLOR]
# Switch to game over screen
$scene = Scene_Gameover.new
return
so we can know if you lost the battle or you just call the gameover secen
anyway I've added a battle lost counter I don't know you might wanna use it like when you end the game you show how many time you lost and other infromation like this (dude I should work on this script every one is thinking about the starting no one thinks about the ending ^_^ )
Anyway you have to add
attr_accessor :lost_battle
under
class Game_Temp
and
under
def initialize in the method in the same class
and add
under
class Game_Party
and
under
def initializein in the method in the same class
the last one add this
[COLOR=blue]def[/COLOR] add_lost_point
@lost += 1
end
in the same class where all def methods are if you don't know where
ok just go down in about line 334 right befor the commants
#-----------------------------------------------------------------------
# * Random Selection of Target Actor (HP 0)
#-----------------------------------------------------------------------
just put it there
Edit : you should also thank Racheal coz she helped me