Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Continue Game after Game Over Script.

HEY! I'm requesting a script that allows a customizable "Continue from last save point" screen after you die and get the Game Over Screen.

Thanks! I'd really appreciate this and thank you all.

Drerius.
 
For VX the command window is in the script lol. One sec let me check.

Eh? It worked in the demo... Here try this. This is the script straight from my game. BTW did it work in the demo I provided?

#==============================================================================
# ** Scene_Gameover
#------------------------------------------------------------------------------
#  This class performs game over screen processing.
#==============================================================================

class Scene_Gameover < Scene_Base
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    load_database                    # Load database
    create_game_objects              # Create game objects
    check_continue                    # Determine if continue is enabled
    create_command_window            # Create command window
    RPG::BGM.stop
    RPG::BGS.stop
    $data_system.gameover_me.play
    Graphics.transition(120)
    Graphics.freeze
    create_gameover_graphic
  end
  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_gameover_graphic
    $scene = nil if $BTEST
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    @command_window.update
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0    #New game
        command_continue
      when 1    #Give up
        $scene = Scene_Title.new
        Graphics.fadeout(120)
      when 2    # Shutdown
        command_shutdown
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Execute Transition
  #--------------------------------------------------------------------------
  def perform_transition
    Graphics.transition(180)
  end
  #--------------------------------------------------------------------------
  # * Create Game Over Graphic
  #--------------------------------------------------------------------------
  def create_gameover_graphic
    @sprite = Sprite.new
    @sprite.bitmap = Cache.system("GameOver")
  end
  #--------------------------------------------------------------------------
  # * Dispose of Game Over Graphic
  #--------------------------------------------------------------------------
  def dispose_gameover_graphic
    @sprite.bitmap.dispose
    @sprite.dispose
  end
    #--------------------------------------------------------------------------
  # * Load Database
  #--------------------------------------------------------------------------
  def load_database
    $data_actors        = load_data("Data/Actors.rvdata")
    $data_classes      = load_data("Data/Classes.rvdata")
    $data_skills        = load_data("Data/Skills.rvdata")
    $data_items        = load_data("Data/Items.rvdata")
    $data_weapons      = load_data("Data/Weapons.rvdata")
    $data_armors        = load_data("Data/Armors.rvdata")
    $data_enemies      = load_data("Data/Enemies.rvdata")
    $data_troops        = load_data("Data/Troops.rvdata")
    $data_states        = load_data("Data/States.rvdata")
    $data_animations    = load_data("Data/Animations.rvdata")
    $data_common_events = load_data("Data/CommonEvents.rvdata")
    $data_system        = load_data("Data/System.rvdata")
    $data_areas        = load_data("Data/Areas.rvdata")
  end
  def load_bt_database
    $data_actors        = load_data("Data/BT_Actors.rvdata")
    $data_classes      = load_data("Data/BT_Classes.rvdata")
    $data_skills        = load_data("Data/BT_Skills.rvdata")
    $data_items        = load_data("Data/BT_Items.rvdata")
    $data_weapons      = load_data("Data/BT_Weapons.rvdata")
    $data_armors        = load_data("Data/BT_Armors.rvdata")
    $data_enemies      = load_data("Data/BT_Enemies.rvdata")
    $data_troops        = load_data("Data/BT_Troops.rvdata")
    $data_states        = load_data("Data/BT_States.rvdata")
    $data_animations    = load_data("Data/BT_Animations.rvdata")
    $data_common_events = load_data("Data/BT_CommonEvents.rvdata")
    $data_system        = load_data("Data/BT_System.rvdata")
  end
  def create_game_objects
    $game_temp          = Game_Temp.new
    $game_message      = Game_Message.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables    = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_actors        = Game_Actors.new
    $game_party        = Game_Party.new
    $game_troop        = Game_Troop.new
    $game_map          = Game_Map.new
    $game_player        = Game_Player.new
  end
  def check_continue
    @continue_enabled = (Dir.glob('Save*.rvdata').size > 0)
  end
  def create_command_window
    s1 = Vocab::new_game
    s2 = Vocab::continue
    s3 = Vocab::shutdown
    @command_window = Window_Command.new(172, ["Continue?", "Give Up", "Shutdown"])
    @command_window.x = (544 - @command_window.width) / 2
    @command_window.y = 288
    if @continue_enabled                    # If continue is enabled
      @command_window.index = 0            # Move cursor over command
    else                                    # If disabled
      @command_window.draw_item(0, false)  # Make command semi-transparent
    end
    @command_window.openness = 0
    @command_window.open
  end
  def dispose_command_window
    @command_window.dispose
  end
  def open_command_window
    @command_window.open
    begin
      @command_window.update
      Graphics.update
    end until @command_window.openness == 255
  end
  def close_command_window
    @command_window.close
    begin
      @command_window.update
      Graphics.update
    end until @command_window.openness == 0
  end
  def confirm_player_location
    if $data_system.start_map_id == 0
      print "Player start location not set."
      exit
    end
  end
  def command_new_game
    confirm_player_location
    Sound.play_decision
    $game_party.setup_starting_members            # Initial party
    $game_map.setup($data_system.start_map_id)    # Initial map position
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    $game_player.refresh
    $scene = Scene_Map.new
    RPG::BGM.fade(1500)
    close_command_window
    Graphics.fadeout(60)
    Graphics.wait(40)
    Graphics.frame_count = 0
    RPG::BGM.stop
    $game_map.autoplay
  end
  #--------------------------------------------------------------------------
  # * Command: Continue
  #--------------------------------------------------------------------------
  def command_continue
    if @continue_enabled
      Sound.play_decision
      $scene = Scene_File.new(false, true, false)
    else
      Sound.play_buzzer
    end
  end
  #--------------------------------------------------------------------------
  # * Command: Shutdown
  #--------------------------------------------------------------------------
  def command_shutdown
    Sound.play_decision
    RPG::BGM.fade(800)
    RPG::BGS.fade(800)
    RPG::ME.fade(800)
    $scene = nil
  end
end
 
It's alright. Simply delete the code in the script you copyed and past in the new text from the spoiler.

Is it above main?

It should be pasted here...

â–¼ Materials
(Place script here)

Main
 
Well... We would have to set it up with the functions $game_party.gold this will effect the parties gold. Then we just add in a multipulyer. In the case of 25% that would be .75 (meaning you keep 75% of you gold) then we just simply say $scene_map.new meaning it will call the map scene A.K.A. the map you were on back up.

it's incredibly simple but we run into one issue..... Might continue during an event. Meaning in let's say a boss event it will cause unknown errors. I'll have to play with it. Till then lets consider this topic resolved ^.^.

Keep in contact and tell me how your project goes!

The members of the Dawn of Darkness team love to offer support!

I'm off to bed. I hope I offered as much help as you needed.

If you have anything you need right now simply say before I go to sleep ^.^
 
Alright lol, sounds like a plan! I appreciate your help so much, I'd like to send you a demo of my game so far want to check it out?

BTW: I love your game DOD it seems like it's really cool so far XD
 
Hahaha sure and thank you for you complement. I would love to work with you demo and tell you how it is. Simply PM me and I'll look at it tomorrow. If you want I have about eh... 6 games? that I'm working on. I can send you a few so you can learn scripting! Fell free to join the team at www.dawnofdarknesshome.webs.com we would love to have your games there!

As for this topic it has started to become a tangent (off topic) You should refer anyother info for me through PM's.

I if a mod sees this topic it has been resolved and is free to be locked up! ^.^
 
WOW! Alright thanks lol, I will PM you tomorrow with my demo. I will join tonight I'm very excited thank you! Yes, please I'd love to learn scripting. I'd also like some help making a title screen lol, but more on that later. we're going "tangent" HAHA! alright, talk to you tomorrow. I appreciate your help more than you know, RMVX is so much fun!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top