VX 스크립트

#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
#  This class brings together map screen sprites, tilemaps, etc. It's used
# within the Scene_Map class.
#==============================================================================
  class Spriteset_Map
  #--------------------------------------------------------------------------
  # * Constant Variables
  #--------------------------------------------------------------------------
  MAP_VAR_SWITCH = {
    # map_id => [{var_id => var_data, }, {switch_id => switch_data, }],
    1 => [{1 => 'One', }, {1 => true, }],
    2 => [{2 => 'Two'', }, {1 => false, }],
  }
  #--------------------------------------------------------------------------
  # * Alias Methods
  #--------------------------------------------------------------------------
  alias just_variablefidget_spriteset_map_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    just_variablefidget_spriteset_map_initialize
   
    # Make sure these guys exist.
    return if $game_variables.nil? || $game_switches.nil? ||
      MAP_VAR_SWITCH[$game_map.map_id].nil?
     
    MAP_VAR_SWITCH[$game_map.map_id][0].each do |var_id, var_data|
      $game_variables[var_id] = var_data
    end
     
    MAP_VAR_SWITCH[$game_map.map_id][1].each do |switch_id, switch_data|
      $game_switches[switch_id] = switch_data
    end
  end
end

맵마다 변수와 스위치를 조정합니다.


사용방법
"맵아이디 번호" => [("변수번호" => '대입수',), ("스위치번호" => true / false, )],

식으로 사용합니다.

위쪽에 예시로 적혀있는건, 맵아이디1번에는 1번의 변수에 one을 대입, 1번의 스위치를 켜고 맵아이디2번에서는 1번에 변수에 two를 대입, 1번의 스위치를 끕니다.

스크립트는 rmxp에서 개인질문으로 얻게된건데, 쓰지 않게 되버려서 홈페이지에 올려둡니다.
Comment '5'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 6661
577 메뉴 Etude87's Menu Editor for VX 25 습작 2015.01.14 1514
576 메뉴 Etude87_Ace_Style_Formation_Change ver.1.01 습작 2014.10.05 789
575 기타 Etude87_GAGA_Chat 4 습작 2012.06.14 1936
574 기타 Etude87_Hangul_utf8_List 습작 2012.06.04 1698
573 이름입력 Etude87_HG_Hangul_Name_Scene file 습작 2012.06.14 1967
572 메시지 Etude87_Item_Choice ver.1.00 file 습작 2013.02.16 1789
571 맵/타일 Etude87_Map_Remember_VX ver.1.2 3 습작 2012.03.06 2449
570 전투 Etude87_Tankentai_Addon ver.1.0 7 file 습작 2012.06.03 2923
569 변수/스위치 Etude87_Variables_VX 1 file 습작 2011.11.26 2637
568 장비 Expansion_Suite V2.1! 6 Man... 2008.10.25 1629
567 맵/타일 Final Fantasy IV 모든 완성된맵 47 RPGbooster 2008.10.11 5144
566 메뉴 Final Fantasy VII Menu System 8 비극ㆍ 2010.04.19 3518
565 fog[안개] 효과 43 file RPGbooster 2008.10.08 4211
564 전투 Fomars indiviivdual battle 2 Man... 2008.10.28 1377
563 상태/속성 Full Status CMS 1.0d by Modern Algebra 1 file Alkaid 2010.09.03 2424
562 기타 Fullscreen++ by Zeus81 (VX/VXA) 2 Alkaid 2012.09.01 2255
561 기타 Gamepad Extender VX 습작 2015.01.02 698
560 Good VS EVil? 4 Man... 2008.10.28 1657
559 버그픽스 Graphical Object Global Reference VX by Mithran Alkaid 2014.03.03 1063
558 타이틀/게임오버 Graphics Load System 1.0.1 14 file NightWind AYARSB 2010.06.10 3268
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32