질문과 답변

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 12391
스크립트 작성 RMMZ 혹시 이런 식으로 몬스터 구분을 알파벳으로 한 걸 없앨 수는 없나요? 2 file 하라아아암 2023.08.28 46
스크립트 작성 RMVXA 현재 장착하고있는 무기의 id는 어떻게 적나요? 2 딱딱이 2020.02.26 56
스크립트 작성 RMVXA 해상도 제한을 푸는 스크립트를 도저히 찾을 수가 없습니다. 1 zx히어로zx 2022.03.20 232
스크립트 작성 RMMV 해당 이벤트의 x, y 좌표를 변수 조작 없이 스크립트로 호출할 수 있나요? 3 file LV 2022.11.01 60
스크립트 작성 RMXP 피격시 배틀러 그래픽이 변하는 스크립트 GAME중독 2019.05.23 94
스크립트 작성 RMMV 플러그인 내에 있는 스크립트를 수정하고 싶은데 어디를 어떻게 바꿔야 할 지 모르겠습니다 1 file PPPL 2019.11.12 89
스크립트 작성 RMVXA 파일이름 변경 배경 2020.07.10 58
스크립트 작성 RMXP 특정 파일을 만드는 스크립트를 어떻게 제작하나요+특정 파일을 인식하는 스크립트는 어떻게 적용해야 하나요 2 인사 2019.07.22 143
스크립트 작성 RMMV 특정 이벤트의 셀프 스위치를 변경시키려고 합니다. 2 도Vㅏ킨 2021.12.30 98
스크립트 작성 RMVXA 특정 위치 위에 있을 때 방향키나 기타 특정 키를 입력받았을때 정해진 기능이 실행되게 하려고 합니다. 1 무명유실 2019.12.09 68
스크립트 작성 RMMV 특정 스킬을 가지고 있으면 상점에서의 가격이 변동이 생기게 하는건 힘들까요? Wolf君 2023.01.26 41
스크립트 작성 RMVXA 특정 상태에서 치명피해량이 증가하는 상태를 구현하고 싶습니다. 2 AAAA. 2023.09.22 36
스크립트 작성 RMVX 특별한 순서없이 조건을 실행 시킬수 있는 방법이 있을까요? 1 송실용 2019.09.28 48
스크립트 작성 RMVXA 타이틀에서 새로하기 눌러도 브금 안끊기게 하는 법 3 슈필러 2019.02.26 158
스크립트 작성 RMMV 타이틀 메뉴 나가기 활성화 1 원혁 2021.05.23 147
스크립트 작성 RMMV 컴퓨터의 실제 날짜를 게임에 불러오고 싶습니다 2 김신아 2022.01.25 389
스크립트 작성 RMMV 커스텀 매뉴에 소지금 표시하기 1 hurakan 2020.10.05 128
스크립트 작성 RMVXA 커먼이벤트를 스크립트에서 실행하려면 어떻게 해야 하나요? 2 이경로 2020.05.23 166
스크립트 작성 RMVXA 캐릭터 sprites 프레임 수정 file 게이킹덤 2020.03.25 113
스크립트 작성 RMVXA 초보)이런 스킬트리는 어떻게 만들죠? file 겜만들고싶다앙 2020.10.14 229
Board Pagination Prev 1 2 3 4 5 Next
/ 5