#============================================================================== # ○イベントのコピー Ver1.01 # for RGSS3 # 巫女瓜 / Space not far # http://muspell.raindrop.jp/ # 指定したマップのイベントのページ内容を、現在のマップのイベントにコピーします。 #============================================================================== # イベントコマンドのスクリプトで =begin pasteevent_id = 1 # ペースト先のイベントID map_id = 1 # コピー元のマップID event_id = 1 # コピー元のイベントID selfswitch = false # セルフスイッチをコピーするか(true or false) copy_event(pasteevent_id, map_id, event_id, selfswitch) =end # という感じで class Game_Interpreter #-------------------------------------------------------------------------- # イベントのコピー #-------------------------------------------------------------------------- SWITCHES = ["A", "B", "C", "D"] def copy_event(pasteevent_id, map_id, event_id, selfswitch = false) map = load_data(sprintf("Data/Map%03d.rvdata2", map_id)) event = map.events[event_id] $game_map.events[pasteevent_id].event.pages = event.pages if selfswitch for i in SWITCHES key = [map_id, event_id, i] result = $game_self_switches[key] pastekey = [@map_id, pasteevent_id, i] $game_self_switches[pastekey] = result end end $game_map.refresh_tile_events $game_map.need_refresh = true end end class Game_Event < Game_Character def event @event end end