collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Letzten Speicherstand laden  (Gelesen 1513 mal)

psychokill

  • Gast
Letzten Speicherstand laden
« am: August 05, 2008, 16:53:54 »
Hallo,

ich möchte meinem Spiel die Möglichkeit, oder sagen wir besser mal, den Spielern nur einen Speicherstand aufzwingen.
Sodass man praktisch nur einen "Slot" zum Speichern und Laden hat.
Klickt man nun, nachdem man gespeichert und das Spiel beendet und neugestartet hat, auf Fortfahren so soll automatisch der letzte gespeicherte Spielstand geladen werden, ohne jetzt ein Extra Fenster zu sehen.

Genauso auch mim Speichern, man sollte auf Speichern klicken und dann wird automatisch gespeichert.

Jemand ne Idee wie man das machen könnte?
« Letzte Änderung: August 05, 2008, 16:54:39 von psychokill »

Re: Letzten Speicherstand laden

Offline Claine

  • Makerer aus Zeitvertreib
  • Eventmeister
  • ***
  • Beiträge: 422
  • Digimon-Fan
    • Digimon New Generation FRPG
Re: Letzten Speicherstand laden
« Antwort #1 am: August 05, 2008, 17:52:44 »
Für nur einen Slot kannst du das hier verwenden (by unsere/m guten/n/m Erzengel ^^):

Spoiler for Hiden:
#==============================================================================
# ** More savefiles 1.01 (http://erzvx.de.ms/scripts/MoreSavefiles.txt)
#------------------------------------------------------------------------------
#  written by ERZENGEL
#==============================================================================

# Max amount of savefiles
MAXSAVEFILES = 10

#==============================================================================
# ** Window_SaveFile
#------------------------------------------------------------------------------
#  This window displays save files on the save and load screens.
#==============================================================================

class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     file_index : save file index (0 to the value of MAXSAVEFILES)
  #     filename   : filename
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
    super(0, 56 + file_index % MAXSAVEFILES * 90, 544, 90)
    @file_index = file_index
    @filename = filename
    load_gamedata
    refresh
    @selected = false
  end
end

#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  This class performs the save and load screen processing.
#==============================================================================

class Scene_File
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start 
    super
    @file_max = MAXSAVEFILES
    create_menu_background
    @help_window = Window_Help.new
    create_savefile_windows
    if @saving
      @index = $game_temp.last_file_index
      @help_window.set_text(Vocab::SaveMessage)
    else
      @index = self.latest_file_index
      @help_window.set_text(Vocab::LoadMessage)
    end
    @savefile_windows[@index].selected = true
    @page_file_max = ((416 - @help_window.height) / 90).truncate
    for i in 0...@file_max
      window = @savefile_windows[i]
      if @index > @page_file_max - 1
        if @index < @file_max - @page_file_max - 1
          @top_row = @index
          window.y -= @index * window.height
        elsif @index >= @file_max - @page_file_max
          @top_row = @file_max - @page_file_max
          window.y -= (@file_max - @page_file_max) * window.height
        else
          @top_row = @index
          window.y -= @index * window.height
        end
      end
      window.visible = (window.y >= @help_window.height and
      window.y < @help_window.height + @page_file_max * window.height)
    end
  end
  #--------------------------------------------------------------------------
  # * Create Save File Window
  #--------------------------------------------------------------------------
  def create_savefile_windows
    @top_row = 0
    @savefile_windows = []
    for i in 0...@file_max
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
  end
  #--------------------------------------------------------------------------
  # * Move cursor down
  #     wrap : Wraparound allowed
  #--------------------------------------------------------------------------
  def cursor_down(wrap)
    if @index < @file_max - 1 or wrap
      @index = (@index + 1) % @file_max
      for i in 0...@file_max
        window = @savefile_windows[i]
        if @index == 0
          @top_row = 0
          window.y = @help_window.height + i % @file_max * window.height
        elsif @index - @top_row > @page_file_max - 1
          window.y -= window.height
        end
        window.visible = (window.y >= @help_window.height and
          window.y < @help_window.height + @page_file_max * window.height)
      end
      if @index - @top_row > @page_file_max - 1
        @top_row += 1
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Move cursor up
  #     wrap : Wraparound allowed
  #--------------------------------------------------------------------------
  def cursor_up(wrap)
    if @index > 0 or wrap
      @index = (@index - 1 + @file_max) % @file_max
      for i in 0...@file_max
        window = @savefile_windows[i]
        if @index == @file_max - 1
          @top_row = @file_max - @page_file_max
          window.y = @help_window.height + i % @file_max * window.height
          window.y -= (@file_max - @page_file_max) * window.height
        elsif @index - @top_row < 0
          window.y += window.height
        end
        window.visible = (window.y >= @help_window.height and
          window.y < @help_window.height + @page_file_max * window.height)
      end
      if @index - @top_row < 0
        @top_row -= 1
      end
    end
  end
end

Die anderen Sachen weis ich leider net...

MFG
Claine

Re: Letzten Speicherstand laden

Offline OceanBlue

  • Palmenfan
  • VX-Großmeister
  • *****
  • Beiträge: 822
  • Back from the Dead
Re: Letzten Speicherstand laden
« Antwort #2 am: August 06, 2008, 09:51:58 »
Sry 4 Offtopic, aber ich finde, das muss jetzt mal gesagt/geschrieben werden: ERZENGEL ist männlich.


Re: Letzten Speicherstand laden

Offline anarchy.exe

  • Database-Verunstalter
  • **
  • Beiträge: 137
Re: Letzten Speicherstand laden
« Antwort #3 am: August 06, 2008, 09:56:42 »
Genau das gleiche hab ich auch dabei gedacht^^
Hab mich nur nich dazu durchgedrungen, dass zu schreiben ;-P

 


 Bild des Monats

rooftop party

Views: 4350
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal