질문과 답변

Extra Form
class Window_MenuCommand < Window_Command
  def make_command_list
    add_command(Vocab::item,   :item,   main_commands_enabled)
    add_command(Vocab::save, :save, save_enabled)
    add_command(Vocab::game_end, :game_end)
  end
end



메뉴를 누르면 아이템창, 세이브, 게임종료가 되도록
스크립트가 이렇게 되어있습니다만 

아이템창, 게임 불러오기, 게임종료로 바꾸고 싶습니다
어떻게 고치면 될까요??

Who's 타이타르

?

,,

Comment '4'
  • ?
    맛난호빵 2014.07.28 01:58
    add_command(Vocab::save, :save, save_enabled)

    add_command(Vocab::continue, :continue, continue_enabled)
    로 고치시면 됩니다.
  • ?
    타이타르 2014.07.28 02:39
    제가 그렇게 해봤습니다만 되지 않아서 질문글을 올렸습니다 ㅠㅠ
    그렇게 적용하고 게임안에서 메뉴를 불러오면 이렇게 에러가 뜹니다


    Script '메뉴 스킬,저장,아이템' line 4: NameError occurred.

    undefined local variable or method 'continue_enabled' for
    #<window_MenuCommand:0x9bc16d8>
  • ?
    맛난호빵 2014.07.28 13:24
    아, 실수했네요.
    Window_TitleCommand에서 보면
    continue_enabled 메서드에서
    DataManager.save_file_exists?
    를 반환합니다.
    이놈을 대신 써주시면됩니다.
    어째서 메서드를 하나 더 만들어놨는지 모르겠네요...
    오히려 함수호출 때문에 가뜩이나 느린 루비가 더느려질지도 모르는데..
  • ?
    타이타르 2014.07.29 02:21
    감사합니다^^

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12451
Board Pagination Prev 1 ... 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 Next
/ 83