질문과 답변

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 12451
이벤트 작성 RMXP 100% 적이나 아군에게 상태변화를 부여하는 법을 알려주세요 1 장부호 2019.09.23 32
기타 기타 영어알만툴은 번역기 돌릴수잇는방법이 잇나요? 호시노요나메 2019.09.23 94
턴제 전투 RMMV 알만툴 전투 시 일반공격없이 스킬로만 전투하고 싶습니다. 4 육식산양 2019.09.23 163
기타 RMVXA 쯔꾸르 게임 실행후 캐릭터가 자동으로 이동하고 컨트롤이 되지않습니다. 귀여미드사미 2019.09.23 82
턴제 전투 RMVXA 캐릭터의 일반 공격의 스킬 애니메이션을 다르게 하고 싶어요 2 BIGHEADCRUSHER 2019.09.23 93
맵배치 RMMV 타일셋........ 1 Lamiassss3 2019.09.22 147
기타 RMXP 게임화면 확대하는법 GAME중독 2019.09.20 997
이벤트 작성 RMVXA 확인버튼 눌렀을때 그림 삭제하기 2 MAYO 2019.09.20 350
에러 해결 RMVX 윈도우 스킨을 바꾸었더니 문자가 표시되지 않습니다 탓카 2019.09.18 63
맵배치 RMVXA 타일셋 배경 배치를 하고있는데 투명화된 부분까지 같이 찍혀 배치됩니다 ㅠㅠ 1 file Sigye 2019.09.16 166
기타 RMMV BGM 파일에 ogg파일을 넣었는데 목록에 안뜹니다 4 설견 2019.09.16 102
기본툴 사용법 RMMV 이동키를 따로 만들고 싶어요! MV (횡스크롤) 2 잔혹한봄 2019.09.16 204
이벤트 작성 RMVXA (해결됨) 특정 지형에 있을 때 조사하면 이벤트 실행하게 하는 거 2 file 우좌 2019.09.15 49
이벤트 작성 RMMV 움짤처럼 픽셀이 깨져서 흩어지는 듯한 연출을 만들고 싶어요 3 file 물돼지맛 2019.09.14 190
이벤트 작성 RMMV 얼음위에서 미끄러지는 이벤트 3 file 빵떡2 2019.09.13 116
플러그인 생성 RMMV 메뉴에 불러오기를 넣고 싶습니다 2 file 소녀160 2019.09.09 238
플러그인 생성 RMMV 선택지를 화면 중앙에 놓고 싶습니다 소녀160 2019.09.09 176
이벤트 작성 RMMV 지도 그림 위에 플레이어 위치를 보이게 하는 법 2 file 소녀160 2019.09.09 108
맵배치 RMMV 의자가 캐릭터보다 위에 있게하고 싶어요 1 Jmyu 2019.09.06 166
라이선스 RMVX 스크립트 저작권 관련 2 구찌토끼 2019.09.05 228
Board Pagination Prev 1 ... 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 ... 516 Next
/ 516