질문과 답변

Extra Form
종류 스크립트 작성

 

필요없는 메뉴를 제거했는데 제가 소지품,저장,종료 이 3가지만 남겨두고 다 지웠거든요? 경로는 맞는데 저장, 종료를 들어가고 다시 나가면 위에 사진처럼 밑에 불필요한 공백이 생깁니다. 처음엔 선택지를 안지웠나 했는데 그건 아니더라고요. 일단 제가 수정한 스크립트를 남겨놓겠습니다. scene_menu 스크립트 입니다.

 

#==============================================================================
# ** 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
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s5 = "저장"
    s6 = "종료"
    @command_window = Window_Command.new(180, [s1, s5, s6])
    @command_window.index = @menu_index
    # 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)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
    # 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
    # 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 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)
      # 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
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # 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
      when 2  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      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)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # 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)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end
 

 

 

 

 

 

 

 

■ 질문전 필독!
  • 질문할 내용이 이 게시판이나 강좌에 이미 있는지 확인합니다.
  • 하나의 게시물에는 하나의 질문만 합니다.
  • 제목은 질문의 핵심 내용으로 작성합니다.
  • 질문 내용은 답변자가 쉽게 이해할 수 있도록 최대한 상세하게 작성합니다.
  • 스크립트의 전문이 필요할 경우 txt 파일 등으로 첨부해 주시기 바랍니다.
  • 답변받은 게시물은 삭제하지 않습니다.
  • 답변이 완료된 경우 해당 답변해주신 분들께 감사의 댓글을 달아줍니다.
    • 처음 오신 분들은 공지 게시물을 반드시 읽어주세요!

※ 미준수시 사전경고 없이 게시물을 삭제합니다.

Comment '3'
  • profile
    노마리(Nomary) 2022.05.10 00:18
    S5, S6 부분들을 S2, S3로 1,2,3 순서에 맞게 바꿔주시면 될 거 같아요!
  • ?
    김빡빡 2022.05.11 21:59
    그래도 안되네요ㅠ 답변 감사합니다...
  • ?
    김빡빡 2022.05.17 22:16
    오류 수정했습니다! 생각보다 복잡했네요...

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12447
게임 배포 RMXP 게임 파일 깔끔하게 만드는 법 1 file 세계제일미소년 2022.07.24 133
기본툴 사용법 RMXP 알만툴로 횡스크롤 비스무리하게 만들수 있나요? 1 팀OVE 2021.09.10 215
기본툴 사용법 RMXP xp 에서 자작 캐릭터칩의 크기를 보통보다 크게하고싶습니다 2 닉넴넴 2019.03.07 217
기본툴 사용법 RMXP 알만툴 MV시스템 메시지 변경 6 만두로이드 2019.01.08 449
기본툴 사용법 RMXP rpg xp 프로젝트 파일이 안보입니다 2 file qlsw980 2019.04.30 173
기본툴 사용법 RMXP 아이템 사용 시 검은화면이 나왔다가 다시 돌아가는 이벤트 4 닉넴넴 2019.08.02 143
기본툴 사용법 RMXP 맵파일을 복사하는법이 따로있나요? 4 독햄마님 2019.11.24 93
기본툴 사용법 RMXP 대화창을 윈도우 스킨말고 다른 형식으로 지정가능한가요 2 와방스 2021.12.25 282
기본툴 사용법 RMXP RMxp쓰는데 달리기가 안먹혀요 2 김응아 2022.01.05 154
기본툴 사용법 RMXP 무기장착에 따른 캐릭터 이미지 변화 스크립트없이 구현 불가능한가요? 3 ecdysis93 2023.09.02 47
기타 RMXP 게임화면 확대하는법 GAME중독 2019.09.20 997
기타 RMXP 다른 게임들 처럼 3 enkephalin 2020.09.28 252
기타 RMXP 도트말고 펜선 캐릭터 칩은 규격을 어떻게 해야하나요? 먼지를먹다 2019.06.14 124
기타 RMXP 대화창 색 바꾸는 법이 알고 싶습니다. 2 file 상어뽑기_샤샤 2019.02.12 1329
기타 RMXP 윈도우창 불투명하게 설정하고 싶은데 어떻게 해야하나요? 2 file 상어뽑기_샤샤 2019.02.13 320
기타 RMXP 대체 왜 타일 추가가 않되는 걸까요ㅠㅠ 3 file 상어뽑기_샤샤 2019.02.13 82
기타 RMXP 혹시 이 일본 스크립트 사이트들 스크립트 소장하고 계신분 계신가요? 오늘밤어때 2019.02.27 94
기타 RMXP 캐릭터칩 제작방법 2 늑이씨 2019.04.12 255
기타 RMXP 게임 파일에서 3 TH.Wert 2020.10.22 145
기타 RMXP RPGXP) 맵칩만드는방법 2 늑이씨 2019.05.02 378
Board Pagination Prev 1 2 3 4 5 Next
/ 5