• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other Question] Please D: Script teleport.

  • 11
    Posts
    4
    Years
    • Seen Sep 12, 2020
    I am using google translator hope it is understood.
    I have a question, does anyone know if there is a script for the hero to teleport? I'm using the "modular pause menu" and I want to create an option that teleports the hero directly to his home, but for that I need the line of code that the hero carries.

    [PokeCommunity.com] Please D: Script teleport.


    original language of my doubt: estoy usando el traductor de google espero que se entienda.
    Tengo una duda ¿Alguien sabe si existe un script para que el heroe se teletransporte? Estoy usando el "modular pause menú" y quiero crear una opción que teletransporte al heroe directamente a su casa, pero para eso encesito la linea de código que transporta el heroe.
     
    You can warp a player using this section of code
    Code:
      pbFadeOutIn(99999){
        $game_temp.player_transferring   = true
        $game_temp.transition_processing = true
        $game_temp.player_new_map_id    = map_id
        $game_temp.player_new_x         = x
        $game_temp.player_new_y         = y
        $game_temp.player_new_direction = direction
        $scene.transfer_player
      }
    You don't need the pbFadeOutIn(99999){ }, just the insides, but this will make a nice fade out and in for the warp.
    map_id is the id from RMXP, but don't make any leading zeros (ie type 24, not 024)
    x and y are the position on the map.
    direction is the way the player will face after warping. 2 is down, 8 is up, 4 is left and 6 is right.
    so your full code will look like
    Code:
    menu.pbEndScene
    menu.endscene = false
    pbFadeOutIn(99999){
      $game_temp.player_transferring   = true
      $game_temp.transition_processing = true
      $game_temp.player_new_map_id    = map_id
      $game_temp.player_new_x         = x
      $game_temp.player_new_y         = y
      $game_temp.player_new_direction = direction
      $scene.transfer_player
    }
    menu.close = true
    I think that will do the trick.
     
    Back
    Top