• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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