VX 스크립트

#===========================================
#  Final Fantasy Styled Savepoint System
#               for RMVX
#                 v1.0
#             by  Rubymatt
#===========================================

class Scene_Savepoint < Scene_Base
  def start
    super
    create_menu_background
    create_command_window
  end
  def post_start
    super
    open_command_window
  end
  def terminate
    super
    dispose_command_window
    dispose_menu_background
  end
  def update
    super
    update_menu_background
    @command_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      case @command_window.index
      when 0 
        Sound.play_decision
        $scene = Scene_File.new(true, false, true)
      when 1
        if $game_party.item_number($data_items[@tent]) < 1         
          Sound.play_buzzer 
        else
          Sound.play_recovery
          $game_party.lose_item($data_items[@tent], 1, false)
          for actor in $game_party.members
            actor.recover_all
          end
          @command_window.dispose
          create_command_window
          @command_window.index = 1
          @command_window.update
        end
      when 2 
        Sound.play_cancel
        $scene = Scene_Map.new
      end
    end
  end
  def update_menu_background
    super
    @menuback_sprite.tone.set(0, 0, 0, 0)
  end
  def create_command_window
    #Edit Below ---------------------------------
    @tent = 21   #ID of Tent item in database
    #Stop Edit ----------------------------------
    s1 = Vocab::save
    s2 = "Tent (" + $game_party.item_number($data_items[@tent]).to_s + " left)"
    s3 = Vocab::cancel
    @command_window = Window_Command.new(172, [s1, s2, s3])
    @command_window.x = (544 - @command_window.width) / 2
    @command_window.y = (416 - @command_window.height) / 2
    if $game_party.item_number($data_items[@tent]) < 1         
      @command_window.draw_item(1, false)   
    end
  end
  def dispose_command_window
    @command_window.dispose
  end
  def open_command_window
    @command_window.open
    begin
      @command_window.update
      Graphics.update
    end until @command_window.openness == 255
  end
  def close_command_window
    @command_window.close
    begin
      @command_window.update
      Graphics.update
    end until @command_window.openness == 0
  end
  def dispose_command_window
    @command_window.dispose
  end
end

으......응?

부속스크립트가아닌 이벤트로 추가해야 하는것가틍데.....

    #Edit Below ---------------------------------
    @tent = 21   #ID of Tent item in database
    #Stop Edit ----------------------------------

 

출처:rmrk

Comment '2'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5408
90 기타 스크립트강좌 4 아하!잘봤어요. 2009.05.04 2158
89 기타 스크린샷 기능 14 비극ㆍ 2010.04.19 2090
» 기타 세이브 포인트 2 비극ㆍ 2010.04.19 2518
87 기타 설명하기 힘든 스크립트 (스크린샷 확인) 10 file 사람이라면? 2010.08.16 3818
86 기타 사이드뷰배틀에서 찌르기 공격 가능하게(Upgrade!) 6 078656577er 2009.10.15 2838
85 기타 빛 이펙트 71 file DEVIL<Li Patanis Roni Kraudus> 2008.06.06 5861
84 기타 블록 미니게임 11 file 사람이라면? 2010.08.15 2269
83 기타 블랙잭, 룰렛, 포커 스크립트 종합 9 file 도심 2010.08.22 2643
82 기타 범용 게이지 묘화 - KGC 14 file 카르와푸딩의아틀리에 2009.08.19 3476
81 기타 배틀신에서 곡 넘기기 2 rukan 2009.07.02 1757
80 기타 밤낮의 변화에 따른 전투배경의 변화 스크립트 10 file 카르와푸딩의아틀리에 2009.07.01 2948
79 기타 미니게임테트리스 스크립트 ㅋㅋㅋ 27 file 카르와푸딩의아틀리에 2009.06.30 3689
78 기타 미니게임 로또??일까? 14 file 카르와푸딩의아틀리에 2009.06.30 2577
77 기타 문장의 스크롤! 13 루시페르 2009.06.06 2524
76 기타 몬스터 리얼한 효과 27 file 사람이라면? 2010.08.16 5074
75 기타 멥 이름 띄우기 10 신규회원 2012.02.24 3626
74 기타 메뉴에서 애니매이션 사용! 12 비극ㆍ 2010.04.19 3022
73 기타 말풍선 그림 바꾸기 6 file 허걱 2009.08.15 3565
72 기타 로딩중 스크립트 24 file NO.0 2009.07.11 4462
71 기타 레벨업 이펙트... 20 비극ㆍ 2010.04.19 3768
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7