I just about have this working. Just got it going to the wrong place or facing the wrong direction when coming back in on some maps. I will see if I can get it finished in the next couple of hours for you.
It's a smallish script that uses notes on maps and nothing else. So no regions, no common events, no parallel process events. Nice and easy
🙂
Edit: Alright, got it. Seems to be working on a set of 9 maps for me, arranged as in your diagram.
This is the script - just copy and paste into a new slot in Materials. No customization options.
Spoiler
#============================================================================# Map Auto Transfer v1.0# Shaz#============================================================================# This script monitors the player's location, and when the edge of a map# is reached, it auto-transfers to the next map, if an auto-transfer is# set up in map notes#============================================================================# The script works on the assumption that all maps where a transfer is set# up have similar dimensions (transferring right from one map to another,# both maps must have the same height; transferring up/down between maps,# both maps must have the same width; transferring left from one map to the# top of another, the first map's height must be the same as the second# map's width#============================================================================# To set up a transfer between maps, enter a series of exit statements on# the map notes as follows# exit direction map side# direction = left, right, up, down (will transfer when you reach that edge)# map = map id to transfer to# side = left, right, top, bottom (where to transfer to on new map)# # exit right 5 left - go right from current map to left side of map 5# exit up 8 bottom - go up from current map to bottom of map 8# exit left 12 bottom - go left from current map to bottom of map 12# # If exit is not defined for any side of the current map, no auto-transfer# will happen#============================================================================class Game_Map #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- # map exit directions and links for auto-transfers on edge of map attr_reader :exit_left attr_reader :left_map attr_reader :left_side attr_reader :exit_bottom attr_reader :bottom_map attr_reader :bottom_side attr_reader :exit_right attr_reader :right_map attr_reader :right_side attr_reader :exit_top attr_reader :top_map attr_reader :top_side attr_reader :map_id #-------------------------------------------------------------------------- # * Setup #-------------------------------------------------------------------------- alias shaz_autotransfer_map_setup setup def setup(map_id) shaz_autotransfer_map_setup(map_id) setup_notes end #-------------------------------------------------------------------------- # * Setup Notes #-------------------------------------------------------------------------- def setup_notes @exit_left = @exit_right = @exit_top = @exit_bottom = false @map.note.split(/[\r\n+]/).each do |line| case line when /exit\s*(\w+)\s*(\d+)\s*(\w+)/i case $1 when 'left' @exit_left = true @left_map = $2.to_i @left_side = $3 when 'right' @exit_right = true @right_map = $2.to_i @right_side = $3 when 'down' @exit_bottom = true @bottom_map = $2.to_i @bottom_side = $3 when 'up' @exit_top = true @top_map = $2.to_i @top_side = $3 end end end endendclass Game_Player < Game_Character #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- alias shaz_autotransfer_game_player_update update def update shaz_autotransfer_game_player_update update_autotransfer end def update_autotransfer return unless $game_map.exit_left && @x == 0 || $game_map.exit_right && @x == $game_map.width - 1 || $game_map.exit_top && @y == 0 || $game_map.exit_bottom && @y == $game_map.height - 1 # we're transferring, so get new coordinate if @x == 0 map = $game_map.left_map old = @y dir = $game_map.left_side elsif @x == $game_map.width - 1 map = $game_map.right_map old = @y dir = $game_map.right_side elsif @y == 0 map = $game_map.top_map old = @x dir = $game_map.top_side else map = $game_map.bottom_map old = @x dir = $game_map.bottom_side end m = load_data(sprintf('Data/Map%03d.rvdata2', map)) if dir == 'left' reserve_transfer(map, 1, old, 6) elsif dir == 'right' reserve_transfer(map, m.width - 2, old, 4) elsif dir == 'top' reserve_transfer(map, old, 1, 2) elsif dir == 'bottom' reserve_transfer(map, old, m.height - 2, 8) end endend
Now, on each map, edit the map properties and list hat automatic exits you want to use. You will have up to 4 on each map. If an exit is not defined, then the script will assume you don't want an automatic exit on that edge of the map.
Exits are listed in this format:
exit direction map side
direction is up, down, left or right - the direction you are leaving the current map.
map is whatever map is going to be loaded next
side is top, bottom, left or right - where you want to come in on the next map.
So:
exit right 2 left will take you from the right side of the current map, to the left side of map 2
exit down 3 top will take you from the bottom of the current map, to the top of map 3
exit left 4 right will take you from the left of the current map, to the right of map 4
exit up 5 bottom will take you from the top of the current map, to the bottom of map 5
exit right 6 top will take you from the right of the current map, to the top of map 6 (this is one of the 'diagonal' exits that takes you from a northern map to an eastern map)