Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Zamknięty przez: Ayene
Sob 03 Lip, 2010 17:01
Problem z Mr.Mo ABS
Autor Wiadomość
skate51 



Preferowany:
RPG Maker XP

Pomógł: 1 raz
Dołączył: 23 Maj 2010
Posty: 17
Wysłany: Nie 06 Cze, 2010 13:32
Problem z Mr.Mo ABS
Mam problem z wczytaniem gry mam Mr.Mo ABS
i on robi że nie mogę wczytać gry.

Normalnie mam w titlu

Nowa gra
Kontynuuj (jest przyciemnione i nie mogę kliknąć )
Koniec

Taki problem

skrypt to

Kawałek skryptu

Spoiler:

Kod:

  #--------------------------------------------------------------------------
  # * Main Menu Initialization
  #--------------------------------------------------------------------------
   def main_menu
    # Make command window
    s1 = "Nowa Gra"
    s2 = "Kontynuuj"
    s3 = "Wyjdz"
    @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 Test Initialization
  #--------------------------------------------------------------------------
  def main_test_continue
    # 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
  end
  #--------------------------------------------------------------------------
  # * Main Audio Initialization
  #--------------------------------------------------------------------------
  def main_audio
    # Play title BGM
    $game_system.bgm_play($data_system.title_bgm)
    # Stop playing ME and BGS
    Audio.me_stop
    Audio.bgs_stop
  end
  #--------------------------------------------------------------------------
  # * Main Loop
  #--------------------------------------------------------------------------
  def main_loop
    # Update game screen
    Graphics.update
    # Update input information
    Input.update
    # Frame update
    update
  end
  #--------------------------------------------------------------------------
  # * Main Scene Scene Change
  #--------------------------------------------------------------------------
  def main_scenechange?
    # Abort loop if screen is changed
    if $scene != self
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Main Dispose
  #--------------------------------------------------------------------------
  def main_dispose
    automatic_dispose
  end
end

#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================

class Scene_Map
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    main_draw   
    # Main loop
    loop do
      main_loop
      break if main_scenechange?
    end
    main_dispose
    main_tiletrigger
  end
  #--------------------------------------------------------------------------
  # * Main Draw
  #--------------------------------------------------------------------------
  def main_draw
    # Make sprite set
    @spriteset = Spriteset_Map.new
    # Make message window
    @message_window = Window_Message.new
    # Transition run
    Graphics.transition
  end
  #--------------------------------------------------------------------------
  # * Main Loop
  #--------------------------------------------------------------------------
  def main_loop
    # Update game screen
    Graphics.update
    # Update input information
    Input.update
    # Frame update
    update
  end
  #--------------------------------------------------------------------------
  # * Main Scene Change
  #--------------------------------------------------------------------------
  def main_scenechange?
    # Abort loop if screen is changed
    if $scene != self
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Main Dispose
  #--------------------------------------------------------------------------
  def main_dispose
    Graphics.freeze
    @spriteset.dispose
    automatic_dispose
  end
  #--------------------------------------------------------------------------
  # * Main Tiletrigger
  #--------------------------------------------------------------------------
  def main_tiletrigger
    # If switching to title screen
    if $scene.is_a?(Scene_Title)
      # Fade out screen
      Graphics.transition
      Graphics.freeze
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Loop
    loop do
      update_systems
      # Abort loop if player isn't place moving
      unless $game_temp.player_transferring
        break
      end
      # Run place move
      transfer_player
      # Abort loop if transition processing
      if $game_temp.transition_processing
        break
      end
    end
    update_graphics
    return if update_game_over? == true
    return if update_to_title? == true
    # If transition 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 showing message window
    if $game_temp.message_window_showing
      return
    end
    # If encounter list isn't empty, and encounter count is 0
    if $game_player.encounter_count == 0 and $game_map.encounter_list != []
      # If event is running or encounter is not forbidden
      unless $game_system.map_interpreter.running? or
             $game_system.encounter_disabled
        # Confirm troop
        n = rand($game_map.encounter_list.size)
        troop_id = $game_map.encounter_list[n]
        # If troop is valid
        if $data_troops[troop_id] != nil
          # Set battle calling flag
          $game_temp.battle_calling = true
          $game_temp.battle_troop_id = troop_id
          $game_temp.battle_can_escape = true
          $game_temp.battle_can_lose = false
          $game_temp.battle_proc = nil
        end
      end
    end
    update_call_menu
    update_call_debug
    # If player is not moving
    unless $game_player.moving?
      update_scene
    end
  end
  #--------------------------------------------------------------------------
  # * Update Systems
  #--------------------------------------------------------------------------
  def update_systems
    # Update map, interpreter, and player order
      # (this update order is important for when conditions are fulfilled
      # to run any event, and the player isn't provided the opportunity to
      # move in an instant)
      $game_map.update
      $game_system.map_interpreter.update
      $game_player.update
      # Update system (timer), screen
      $game_system.update
      $game_screen.update
  end
  #--------------------------------------------------------------------------
  # * Update Graphics
  #--------------------------------------------------------------------------
  def update_graphics
    # Update sprite set
    @spriteset.update
    # Update message window
    @message_window.update
  end
  #--------------------------------------------------------------------------
  # * Update Game Over
  #--------------------------------------------------------------------------
  def update_game_over?
     # If game over
    if $game_temp.gameover
      # Switch to game over screen
      $scene = Scene_Gameover.new
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Update To Title
  #--------------------------------------------------------------------------
  def update_to_title?
    # If returning to title screen
    if $game_temp.to_title
      # Change to title screen
      $scene = Scene_Title.new
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Update Menu Call
  #--------------------------------------------------------------------------
  def update_call_menu
    # If B button was pressed
    if Input.trigger?(Input::B)
      # If event is running, or menu is not forbidden
      unless $game_system.map_interpreter.running? or
             $game_system.menu_disabled
        # Set menu calling flag or beep flag
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Debug Call
  #--------------------------------------------------------------------------
  def update_call_debug
    # If debug mode is ON and F9 key was pressed
    if $DEBUG and Input.press?(Input::F9)
      # Set debug calling flag
      $game_temp.debug_calling = true
    end
  end
  #--------------------------------------------------------------------------
  # * Update Scene
  #--------------------------------------------------------------------------
  def update_scene
    # Run calling of each screen
    if $game_temp.battle_calling
       call_battle
     elsif $game_temp.shop_calling
       call_shop
     elsif $game_temp.name_calling
       call_name
     elsif $game_temp.menu_calling
       call_menu
     elsif $game_temp.save_calling
       call_save
     elsif $game_temp.debug_calling
       call_debug
     end
  end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
    commands_init
  end
  #--------------------------------------------------------------------------
  # * Set Commands
  #--------------------------------------------------------------------------
  def commands_init
    @commands = []
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save"
    s6 = "End Game"
    @commands.push(s1, s2, s3, s4, s5, s6).flatten!
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    main_command_window
    main_windows
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      main_loop
      break if main_scenechange?
    end
    # Refresh map
    $game_map.refresh
    # Prepare for transition
    Graphics.freeze
    main_dispose
  end
  #--------------------------------------------------------------------------
  # * Main Command Window
  #--------------------------------------------------------------------------
  def main_command_window
    @command_window = Window_Command.new(160, @commands)
    @command_window.index = @menu_index
    @command_window.height = 224
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
  end
  #--------------------------------------------------------------------------
  # * Main Command Window
  #--------------------------------------------------------------------------
  def main_windows
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 224
    # Make steps window
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 320
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
   end
  #--------------------------------------------------------------------------
  # * Main Loop
  #--------------------------------------------------------------------------
   def main_loop
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
   end
  #--------------------------------------------------------------------------
  # * Scene Change
  #--------------------------------------------------------------------------
  def main_scenechange?
    # Abort loop if screen is changed
    if $scene != self
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Main Dispose
  #--------------------------------------------------------------------------
  def main_dispose
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @playtime_window.update
    @steps_window.update
    @gold_window.update
    @status_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      update_command_check
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      buzzer_check
      update_status_check unless buzzer_check
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Buzzer Check
  #--------------------------------------------------------------------------
  def buzzer_check
    # If command other than save or end game, and party members = 0
    if $game_party.actors.size == 0 and @command_window.index < 4
      # Play buzzer SE
      $game_system.se_play($data_system.buzzer_se)
      return true
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command Check
  #--------------------------------------------------------------------------
  def update_command_check
    # Loads Current Command
    command = @commands[@command_window.index]
    # Checks Commands
    if command == $data_system.words.item
      command_item
    elsif command == $data_system.words.skill
      command_start_skill
    elsif command == $data_system.words.equip
      command_start_equip
    elsif command == 'Status'
      command_start_status
    elsif command == 'Save'
      command_save
    elsif command == 'End Game'
      command_endgame
    end
  end
  #--------------------------------------------------------------------------
  # * Update Status Check
  #--------------------------------------------------------------------------
  def update_status_check
    # Loads Current Command
    command = @commands[@command_window.index]
    # Checks Command By Name
    if command == $data_system.words.skill
      command_skill
    elsif command == $data_system.words.equip
      command_equip
    elsif command == 'Status'
      command_status
    end
  end
  #--------------------------------------------------------------------------
  # * Command Item
  #--------------------------------------------------------------------------
  def command_item
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Switch to item screen
    $scene = Scene_Item.new
  end
  #--------------------------------------------------------------------------
  # * Command Start Skill
  #--------------------------------------------------------------------------
  def command_start_skill
    activate_status
  end
  #--------------------------------------------------------------------------
  # * Command Skill
  #--------------------------------------------------------------------------
  def command_skill
    # If this actor's action limit is 2 or more
    if $game_party.actors[@status_window.index].restriction >= 2
      # 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 skill screen
    $scene = Scene_Skill.new(@status_window.index)
  end
  #--------------------------------------------------------------------------
  # * Command Start Equip
  #--------------------------------------------------------------------------
  def command_start_equip
    activate_status
  end
  #--------------------------------------------------------------------------
  # * Command Equip
  #--------------------------------------------------------------------------
  def command_equip
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Switch to equipment screen
    $scene = Scene_Equip.new(@status_window.index)
  end
  #--------------------------------------------------------------------------
  # * Command Start Status
  #--------------------------------------------------------------------------
  def command_start_status
    activate_status
  end
  #--------------------------------------------------------------------------
  # * Command Status
  #--------------------------------------------------------------------------
  def command_status
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Switch to status screen
    $scene = Scene_Status.new(@status_window.index)
  end
  #--------------------------------------------------------------------------
  # * Command Save
  #--------------------------------------------------------------------------
  def command_save
    # If saving is forbidden
    if $game_system.save_disabled
      # 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 save screen
    $scene = Scene_Save.new
  end
  #--------------------------------------------------------------------------
  # * Command End Game
  #--------------------------------------------------------------------------
  def command_endgame
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Switch to end game screen
    $scene = Scene_End.new
  end
  #--------------------------------------------------------------------------
  # * Activate Status Window
  #--------------------------------------------------------------------------
  def activate_status
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Make status window active
    @command_window.active = false
    @status_window.active = true
    @status_window.index = 0
  end
end

#==============================================================================
# ** Scene_Save
#------------------------------------------------------------------------------
#  This class performs save screen processing.
#==============================================================================

class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # * Write Save Data
  #     file : write file object (opened)
  #--------------------------------------------------------------------------
  def write_save_data(file)
    write_characters(file)
    write_frame(file)
    write_setup(file)
    write_data(file)
  end
  #--------------------------------------------------------------------------
  # * Make Character Data
  #--------------------------------------------------------------------------
  def write_characters(file)
    # Make character data for drawing save file
    characters = []
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      characters.push([actor.character_name, actor.character_hue])
    end
    # Write character data for drawing save file
    Marshal.dump(characters, file)
  end
  #--------------------------------------------------------------------------
  # * Write Frame Count
  #--------------------------------------------------------------------------
  def write_frame(file)
    # Wrire frame count for measuring play time
    Marshal.dump(Graphics.frame_count, file)
  end
  #--------------------------------------------------------------------------
  # * Write Setup
  #--------------------------------------------------------------------------
  def write_setup(file)
    # Increase save count by 1
    $game_system.save_count += 1
    # Save magic number
    # (A random value will be written each time saving with editor)
    $game_system.magic_number = $data_system.magic_number
  end
  #--------------------------------------------------------------------------
  # * Write Data
  #--------------------------------------------------------------------------
  def write_data(file)
    # Write each type of game object
    Marshal.dump($game_system, file)
    Marshal.dump($game_switches, file)
    Marshal.dump($game_variables, file)
    Marshal.dump($game_self_switches, file)
    Marshal.dump($game_screen, file)
    Marshal.dump($game_actors, file)
    Marshal.dump($game_party, file)
    Marshal.dump($game_troop, file)
    Marshal.dump($game_map, file)
    Marshal.dump($game_player, file)
  end
end

#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  This class performs load screen processing.
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # * Read Save Data
  #     file : file object for reading (opened)
  #--------------------------------------------------------------------------
  def read_save_data(file)
    read_characters(file)
    read_frame(file)
    read_data(file)
    read_edit
    read_refresh
  end
  #--------------------------------------------------------------------------
  # * Read Character Data
  #--------------------------------------------------------------------------
  def read_characters(file)
    # Read character data for drawing save file
    characters = Marshal.load(file)
  end
  #--------------------------------------------------------------------------
  # * Read Frame Count
  #--------------------------------------------------------------------------
  def read_frame(file)
    # Read frame count for measuring play time
    Graphics.frame_count = Marshal.load(file)
  end
  #--------------------------------------------------------------------------
  # * Read Data
  #--------------------------------------------------------------------------
  def read_data(file)
    # Read each type of game object
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
  end
  #--------------------------------------------------------------------------
  # * Read Edit
  #--------------------------------------------------------------------------
  def read_edit
    # If magic number is different from when saving
    # (if editing was added with editor)
    if $game_system.magic_number != $data_system.magic_number
      # Load map
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh Game Party
  #--------------------------------------------------------------------------
  def read_refresh
    # Refresh party members
    $game_party.refresh
  end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================
 
class Scene_Battle
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize
    commands_init
  end
  #--------------------------------------------------------------------------
  # * Set Commands
  #--------------------------------------------------------------------------
  def commands_init
    @commands = []
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    @commands.push(s1, s2, s3, s4).flatten!
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    main_temp
    main_troop
    main_command
    main_windows
    main_spriteset
    main_transition
    # Start pre-battle phase
    start_phase1
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      main_loop
      break if main_scenechange?
    end
    # Refresh map
    $game_map.refresh
    # Prepare for transition
    Graphics.freeze
    main_dispose
    main_end
  end
  #--------------------------------------------------------------------------
  # * Game Temp Variable Setup
  #--------------------------------------------------------------------------
  def main_temp
    # Initialize each kind of temporary battle data
    $game_temp.in_battle = true
    $game_temp.battle_turn = 0
    $game_temp.battle_event_flags.clear
    $game_temp.battle_abort = false
    $game_temp.battle_main_phase = false
    $game_temp.battleback_name = $game_map.battleback_name
    $game_temp.forcing_battler = nil
    # Initialize battle event interpreter
    $game_system.battle_interpreter.setup(nil, 0)
  end
  #--------------------------------------------------------------------------
  # * Troop Setup
  #--------------------------------------------------------------------------
  def main_troop
    # Prepare troop
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
  end
  #--------------------------------------------------------------------------
  # * Main Command Setup
  #--------------------------------------------------------------------------
  def main_command
    @actor_command_window = Window_Command.new(160, @commands)
    @actor_command_window.height = 160
    @actor_command_window.y = 160
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # * Scene Window Setup
  #--------------------------------------------------------------------------
  def main_windows
    # Make other windows
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
  end
  #--------------------------------------------------------------------------
  # * Spriteset Setup
  #--------------------------------------------------------------------------
  def main_spriteset
    # Make sprite set
    @spriteset = Spriteset_Battle.new
    # Initialize wait count
    @wait_count = 0
  end
  #--------------------------------------------------------------------------
  # * Main Transition
  #--------------------------------------------------------------------------
  def main_transition
    # Execute transition
    if $data_system.battle_transition == ""
      Graphics.transition(20)
    else
      Graphics.transition(40, "Graphics/Transitions/" +
        $data_system.battle_transition)
    end
  end
  #--------------------------------------------------------------------------
  # * Main Loop
  #--------------------------------------------------------------------------
  def main_loop
    # Update game screen
    Graphics.update
    # Update input information
    Input.update
    # Frame update
    update
  end
  #--------------------------------------------------------------------------
  # * Scene Change
  #--------------------------------------------------------------------------
  def main_scenechange?
    # Abort loop if screen is changed
    if $scene != self
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Main Dispose
  #--------------------------------------------------------------------------
  def main_dispose
    # Dispose of windows
    @actor_command_window.dispose
    @party_command_window.dispose
    @help_window.dispose
    @status_window.dispose
    @message_window.dispose
    @skill_window.dispose unless @skill_window == nil
    @item_window.dispose unless @item_window == nil
    @result_window.dispose unless @result_window == nil
    # Dispose of sprite set
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Main End
  #--------------------------------------------------------------------------
  def main_end
    # If switching to title screen
    if $scene.is_a?(Scene_Title)
      # Fade out screen
      Graphics.transition
      Graphics.freeze
    end
    # If switching from battle test to any screen other than game over screen
    if $BTEST and not $scene.is_a?(Scene_Gameover)
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_event
    update_system
    update_objects
    update_transition
    # If message window is showing
    if $game_temp.message_window_showing
      return
    end
    # If effect is showing
    if @spriteset.effect?
      return
    end
    update_scene_exit
    update_abort
    update_waiting
    update_phase
  end
  #--------------------------------------------------------------------------
  # * Event Update
  #--------------------------------------------------------------------------
  def update_event
    # 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
  end
  #--------------------------------------------------------------------------
  # * System Update
  #--------------------------------------------------------------------------
  def update_system
    # 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
  end
  #--------------------------------------------------------------------------
  # * Windows and Sprites Update
  #--------------------------------------------------------------------------
  def update_objects
    # Update windows
    @help_window.update
    @party_command_window.update
    @actor_command_window.update
    @status_window.update
    @message_window.update
    # Update sprite set
    @spriteset.update
  end
  #--------------------------------------------------------------------------
  # * Transition Update
  #--------------------------------------------------------------------------
  def update_transition
    # 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
  end
  #--------------------------------------------------------------------------
  # * Scene Exit Update
  #--------------------------------------------------------------------------
  def update_scene_exit
    # If game over
    if $game_temp.gameover
      # 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
  end
  #--------------------------------------------------------------------------
  # * Abort Update
  #--------------------------------------------------------------------------
  def update_abort
    # 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
  end
  #--------------------------------------------------------------------------
  # * Waiting Update
  #--------------------------------------------------------------------------
  def update_waiting
    # 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
  end
  #--------------------------------------------------------------------------
  # * Phase Update
  #--------------------------------------------------------------------------
  def update_phase
    # 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
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : basic command)
  #--------------------------------------------------------------------------
  def update_phase3_basic_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Go to command input for previous actor
      phase3_prior_actor
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      check_commands
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Check Commands
  #--------------------------------------------------------------------------
  def check_commands
    # Loads Current Command
    command = @commands[@actor_command_window.index]
    # Branches Possible Commands
    if command == $data_system.words.attack
      update_phase3_command_attack
    elsif command == $data_system.words.skill
      update_phase3_command_skill
    elsif command == $data_system.words.guard
      update_phase3_command_guard
    elsif command == $data_system.words.item
      update_phase3_command_item
    end
  end
  #--------------------------------------------------------------------------
  # * Command : Attack
  #--------------------------------------------------------------------------
  def update_phase3_command_attack
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Set action
    @active_battler.current_action.kind = 0
    @active_battler.current_action.basic = 0
    # Start enemy selection
    start_enemy_select
  end
  #--------------------------------------------------------------------------
  # * Command : Skill
  #--------------------------------------------------------------------------
  def update_phase3_command_skill
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Set action
    @active_battler.current_action.kind = 1
    # Start skill selection
    start_skill_select
  end
  #--------------------------------------------------------------------------
  # * Command : Guard
  #--------------------------------------------------------------------------
  def update_phase3_command_guard
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Set action
    @active_battler.current_action.kind = 0
    @active_battler.current_action.basic = 1
    # Go to command input for next actor
    phase3_next_actor
  end
  #--------------------------------------------------------------------------
  # * Command : Item
  #--------------------------------------------------------------------------
  def update_phase3_command_item
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Set action
    @active_battler.current_action.kind = 2
    # Start item selection
    start_item_select
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results
  #--------------------------------------------------------------------------
  def make_basic_action_result
    # If attack
    if @active_battler.current_action.basic == 0
      make_basic_action_result_attack
      return
    end
    # If guard
    if @active_battler.current_action.basic == 1
      make_basic_action_result_guard
      return
    end
    # If escape
    if @active_battler.is_a?(Game_Enemy) and
       @active_battler.current_action.basic == 2
      make_basic_action_result_escape
      return
    end
    # If doing nothing
    if @active_battler.current_action.basic == 3
      make_basic_action_result_nothing
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results - Attack
  #--------------------------------------------------------------------------
  def make_basic_action_result_attack
    # Set anaimation ID
    @animation1_id = @active_battler.animation1_id
    @animation2_id = @active_battler.animation2_id
    # If action battler is enemy
    if @active_battler.is_a?(Game_Enemy)
      if @active_battler.restriction == 3
        target = $game_troop.random_target_enemy
      elsif @active_battler.restriction == 2
        target = $game_party.random_target_actor
      else
        index = @active_battler.current_action.target_index
        target = $game_party.smooth_target_actor(index)
      end
    end
    # If action battler is actor
    if @active_battler.is_a?(Game_Actor)
      if @active_battler.restriction == 3
        target = $game_party.random_target_actor
      elsif @active_battler.restriction == 2
        target = $game_troop.random_target_enemy
      else
        index = @active_battler.current_action.target_index
        target = $game_troop.smooth_target_enemy(index)
      end
    end
    # Set array of targeted battlers
    @target_battlers = [target]
    # Apply normal attack results
    for target in @target_battlers
      target.attack_effect(@active_battler)
    end
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results - Guard
  #--------------------------------------------------------------------------
  def make_basic_action_result_guard
    # Display "Guard" in help window
    @help_window.set_text($data_system.words.guard, 1)
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results - Escape
  #--------------------------------------------------------------------------
  def make_basic_action_result_escape
    # Display "Escape" in help window
    @help_window.set_text("Escape", 1)
    # Escape
    @active_battler.escape
  end
  #--------------------------------------------------------------------------
  # * Make Basic Action Results - Nothing
  #--------------------------------------------------------------------------
  def make_basic_action_result_nothing
    # Clear battler being forced into action
    $game_temp.forcing_battler = nil
    # Shift to step 1
    @phase4_step = 1
  end
end

________________________
Pracuje tylko w RPG maker XP
Ostatnio zmieniony przez Ayene Nie 06 Cze, 2010 15:02, w całości zmieniany 1 raz  
 
 
Ayene 




Ranga RM:
4 gry

Pomogła: 232 razy
Dołączyła: 18 Wrz 2007
Posty: 2424
Wysłany: Nie 06 Cze, 2010 15:05
skate51, a masz jakiś dodatkowy skrypt na wczytywanie / zapis gry? Wkleiłeś akurat taką część skryptu, która za wiele nie mówi. Sprawdź czy we wcześniejszym fragmencie znajduje się gdzieś kod: 'main_test_continue'
________________________


 
 
 
skate51 



Preferowany:
RPG Maker XP

Pomógł: 1 raz
Dołączył: 23 Maj 2010
Posty: 17
Wysłany: Nie 06 Cze, 2010 18:22
Nie ma nic takiego w skrypcie
________________________
Pracuje tylko w RPG maker XP
 
 
Ayene 




Ranga RM:
4 gry

Pomogła: 232 razy
Dołączyła: 18 Wrz 2007
Posty: 2424
Wysłany: Nie 06 Cze, 2010 21:28
No to dlatego nie włącza się 'continue', bo ten fragment, który podałam, odpowiada za sprawdzanie, czy w folderze z grą znajdują się zapisy gry. Najlepiej daj linka do tego skryptu, albo zhostuj demo np. na www.mediafire.com a postaram się coś z tym zrobić.
________________________


 
 
 
Yoroiookami 

Omnomnomnom



Preferowany:
RPG Maker XP

Ranga RM:
3 gry

Pomógł: 57 razy
Dołączył: 24 Lut 2010
Posty: 751
Wysłany: Nie 06 Cze, 2010 22:42
Ayene - myślę że gdyby kliknął nowa gra i doszedł do tego momentu, to wszystko działałoby śpiewająco o_o sam często miewałem takie przypadki, choć nie zawsze używając skryptu.
>_>
To tylko taka sugestia.
 
 
MomoMarcin3 




Preferowany:
RPG Maker XP

Pomógł: 2 razy
Dołączył: 20 Sty 2010
Posty: 109
Skąd: 11111
Wysłany: Pią 18 Cze, 2010 06:01
też miałem ten problem :( użyj inną wersje abs-a np.: 5,5 ja mam i działa poprawnie i szybko ;)
________________________
Gra na ktrórej mi naprawde zależy:
http://www.ultimateam.pl/viewtopic.php?t=2723
 
 
Wyświetl posty z ostatnich:   
Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene