Change Map From Selection Screen

Hello!

I'm trying to make a menu where the player can choose between places to travel to, aka maps to transfer the player to. However, I'm unsure how to call the transfer_player method from scenes besides the Scene_Map. Is there a way to link menu options to different maps? Sorry if this is a stupid question/has been solved elsewhere!
If you were using a simple 'SHOW CHOICES' map event so you can have up to 4 choices, you could just use the 'TRANSFER PLAYER' map event. If you wish to get a bit more... code-based, then you would use something akin to:

Code:
    # Set transferring player flag
    $game_temp.player_transferring = true
    # Set player move destination
    $game_temp.player_new_map_id = (your map ID)
    $game_temp.player_new_x = (the X Coord)
    $game_temp.player_new_y = (The Y Coord)
    $game_temp.player_new_direction = (Facing direction)
    Graphics.freeze
    # Set transition processing flag
    $game_temp.transition_processing = true
    $game_temp.transition_name = ""

Mind you, there are scripts out there for map transfers. You could choose from a list with these, some may give you (or require you to supply) graphics of what the map looks like.
Thank you so much for responding so quickly! That sample code works wonderfully when I place it into a script event, but I was wondering if there was a way to call this method from outside of Scene_Map (which I think I could have described better in my first post). For example, that code doesn't work when placed in a Common Event (it tells me it's an undefined method for a Nil class), nor does it work if I try placing it into a menu Scene (although that could be just because of my Scene in the first place). Do you know what might be causing that problem?

I also don't want to hog all of your time though-- if you wouldn't mind pointing me in the direction of the map transfer scripts you mentioned I can try tinkering with those. I tried searching for them myself, but I can't seem to find any for XP.
Well, allow me to replace the first set of code with THIS.

And here, you can use a simple script call of 'transfer' like so: transfer(2,5,4,8) to move to map 2 at coords 5,4 while facing up
Code:
#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
#  This interpreter runs event commands. This class is used within the
#  Game_System class and the Game_Event class.
#==============================================================================

class Interpreter
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     depth : nest depth
  #     main  : main flag
  #     d     : direction (0,2,4,6,8)
  #--------------------------------------------------------------------------
  def transfer(map_id, x, y, d)
    # Set transferring player flag
    $game_temp.player_transferring = true
    # Set player map location
    $game_temp.player_new_map_id = map_id
    # Set Player move destination
    $game_temp.player_new_x = x
    $game_temp.player_new_y = y
    # Set facing direction unless set to 0
    $game_temp.player_new_direction = d unless d == 0
    # Prepare for transition
    Graphics.freeze
    # Set transition processing flag
    $game_temp.transition_processing = true
    $game_temp.transition_name = ""
  end
end

Here's one Map script for your perusal

Scr-XP.png
Travel Menu
by Trickster ()
This script allows you to set up a Warp Menu that allows the players to warp to places you define. Also includes a picture of the place if they have visited it before.

To my surprise, the Diablo2 Waypoints script by Arevulopapo is... GONE! I mean, the original RMXP.Org (now HBGames) links are D.E.A.D., and a couple of Spanish links turns out either encrypted packages or ... FOUND IT!!! BELOW, you have the apparently LOST Diablo 2 Waypoint script by arevulopapo. I had it in an old project.

Code:
#==============================================================================
#   Diablo 2 Waypoints v. 1.1
#   by arevulopapo
#   Mar 1st 2007
#
#
#   To call the Waypoint scene use the "Call script" event command:
#   $scene = Scene_Waypoint.new(parameter)
#   where 'parameter' is the index of the waypoint you're using.
#
#   If you want to activate a waypoint without "touching" it
#   call a script like this:
#   $game_system.waypoints_active << index
#   where 'index' is the index of the waypoint you want to activate.
#
#   See the comments in the Game_System section (right below)
#   for informations on how to customize.
#
#==============================================================================
class Game_System
  #--------------------------------------------------------------------------
  attr_accessor :acts
  attr_accessor :act_names
  attr_accessor :waypoints_active
  attr_accessor :waypoint_sound
  #--------------------------------------------------------------------------
  alias game_system_initialize initialize
  #--------------------------------------------------------------------------
  def initialize
    #--------------------------------------------------------------------------
    # Here you can change the sound played while teleporting
    #--------------------------------------------------------------------------
    @waypoint_sound = "Audio/SE/020-Teleport03"
    #--------------------------------------------------------------------------
    @acts = []
    @act_names = []
    @waypoints_active = []
    #--------------------------------------------------------------------------
    # Here you add the names for the acts. The number of acts will be equal
    # to the number of names you added.
    #--------------------------------------------------------------------------
    @act_names << "Eturi"
    @act_names << "Act II"
    @act_names << "Act III"
    @act_names << "Act IV"
    #--------------------------------------------------------------------------
    for i in 0..@act_names.size - 1
      @acts << []
      @waypoints_active << []
    end
    #--------------------------------------------------------------------------
    # Here you add new waypoints. The formula is like this
    # ["Name", map_id, player_x, player_y]. The number in [] of @acts is
    # the index of the act you're adding a waypoint to.
    #--------------------------------------------------------------------------
    @acts[0] << ["Cave of Trials", 2, 24, 1] # This is the first waypoint. Its added to act 1 (with index 0) and its act index is 0.
    @acts[0] << ["Forest II", 4, 5, 11] # This is the second waypoint added to act 1. Its act index is 1.
    @acts[0] << ["Forest III", 3, 15, 11]
    @acts[0] << ["Forest IV", 1, 11, 2]
    @acts[0] << ["Forest V", 5, 17, 6]
   
    @acts[1] << ["Desert I", 9, 6, 7]
    @acts[1] << ["Desert II", 10, 12, 6]
    @acts[1] << ["Desert II", 11, 8, 3]
    @acts[1] << ["Desert IV", 12, 19, 17]
   
    @acts[2] << ["Swamp I", 13, 3, 5]
    @acts[2] << ["Swamp II", 14, 3, 9]
    @acts[2] << ["Swamp III", 15, 19, 15]
    @acts[2] << ["Swamp IV", 16, 3, 12]
   
    @acts[3] << ["Mountain I", 18, 20, 4]
    @acts[3] << ["Mountain II", 19, 3, 14]
    @acts[3] << ["Mountain III", 20, 6, 17]
    @acts[3] << ["Mountain IV", 21, 3, 11]
    @acts[3] << ["Mountain V", 22, 2, 20]
    #--------------------------------------------------------------------------
    game_system_initialize
  end
  #--------------------------------------------------------------------------
end
#==============================================================================
#==============================================================================
class Window_Waypoint_Name < Window_Base
  #--------------------------------------------------------------------------
  def initialize(act=0)
    super(0,0,320,64)
    self.contents = Bitmap.new(288,32)
    self.back_opacity = 160
    @act = act
    refresh
  end
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0..$game_system.act_names.size - 1
      self.contents.font.color = (@act == i ? normal_color : disabled_color)
      cell = 288/$game_system.act_names.size
      self.contents.draw_text(i * cell,0,cell,32,$game_system.act_names[i],1)
    end
  end
  #--------------------------------------------------------------------------
end
#==============================================================================
#==============================================================================
class Window_Waypoint_List < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize(act, target_act, waypoint)
    super(0, 64, 320, 416)
    self.back_opacity = 160
    @act = act
    @target_act = target_act
    @waypoint = waypoint
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @item_max = $game_system.acts[@target_act].size
    self.contents = Bitmap.new(288, @item_max * 32)
    for i in 0..@item_max - 1
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  def draw_item(index)
    x = 0
    y = (index) * 32
    if $game_system.waypoints_active[@target_act].include?(index)
      self.contents.font.color = normal_color
      text = $game_system.acts[@target_act][index][0].to_s
    else
      self.contents.font.color = disabled_color
      text = ". . ."
    end
    self.contents.draw_text(x, y, 288, 32, text, 1)
  end
  #--------------------------------------------------------------------------
end
#==============================================================================
#==============================================================================
class Scene_Waypoint
  attr_reader :act
  #--------------------------------------------------------------------------
  def initialize(act, waypoint)
    @waypoint = waypoint
    @act = act
    @target_act = act
    $game_system.waypoints_active[@act] << @waypoint unless $game_system.waypoints_active.include?(@waypoint)
  end
  #--------------------------------------------------------------------------
  def main
    @spriteset = Spriteset_Map.new
    @name_window = Window_Waypoint_Name.new(@act)
    @list = Window_Waypoint_List.new(@act, @target_act, @waypoint)
    @list.index = @waypoint
    if $game_player.screen_x < 320
      @name_window.x = 320
      @list.x = 320
    end
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @spriteset.dispose
    @name_window.dispose
    @list.dispose
  end
  #--------------------------------------------------------------------------
  def update
    @list.update
    if Input.trigger?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @list.dispose
      @list = Window_Waypoint_List.new(@act, (@target_act - 1) % $game_system.acts.size, @waypoint)
      @name_window.dispose
      @name_window = Window_Waypoint_Name.new((@target_act - 1) % $game_system.acts.size)
      @target_act -= 1
      @target_act %= $game_system.acts.size
      if $game_player.screen_x < 320
        @name_window.x = 320
        @list.x = 320
      end
    end
    if Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @list.dispose
      @list = Window_Waypoint_List.new(@act, (@target_act + 1) % $game_system.acts.size, @waypoint)
      @name_window.dispose
      @name_window = Window_Waypoint_Name.new((@target_act + 1) % $game_system.acts.size)
      @target_act += 1
      @target_act %= $game_system.acts.size
      if $game_player.screen_x < 320
        @name_window.x = 320
        @list.x = 320
      end
    end
    if Input.trigger?(Input::C)
      if $game_system.waypoints_active[@target_act].include?(@list.index)
        Audio.se_play($game_system.waypoint_sound)
        $game_screen.start_flash(Color.new(255,255,255,160), 5)
        $game_map.setup($game_system.acts[@target_act][@list.index][1])
        $game_player.moveto($game_system.acts[@target_act][@list.index][2], $game_system.acts[@target_act][@list.index][3])
        $game_player.straighten
        $game_map.update
        $game_map.autoplay
        $scene = Scene_Map.new
        Graphics.transition(20)
      else
        $game_system.se_play($data_system.buzzer_se)
      end
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
    end
  end
  #--------------------------------------------------------------------------
end
I'm sorry for responding so late, but THANK YOU so much! Your first chunk of code works perfectly, and the other two examples are really cool and really helpful for inspiration/guidance. I can't thank you enough! Have a lovely day. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/change-map-from-selection-screen.104748/