• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Warping the player to another map with an item

Starlight Minun

LoveEletric
21
Posts
9
Years
    • Seen Jul 15, 2016
    ok i know how to. but thank anyway.
    i actually wanna use item to warp to another place
    so this is what i did

    PokemonItemEffects Scripts
    Code:
    ItemHandlers::UseFromBag.add(:VENELITEFLUTE,proc{|item|
       UseVanFlutes? ? 2 : 0
    })

    Item scripts

    Code:
    def UseVanFlutes?
       if $game_variables[121] == 1
       else
         $game_switches[995] = true
         end
       end

    Common Events (Auto Run) (Game_switches[995])
    Code:
    Transfer Player:[138: 1st floor],(007,011)
    Control Switches:[0995:Fly To Patty Ship] = OFF

    But the problem is. i dont want see the text say "Cant use it here"

    So thank.
     
    1,224
    Posts
    10
    Years
  • Code:
    $game_temp.player_new_map_id = XX
    $game_temp.player_new_x = XX
    $game_temp.player_new_y = XX
    $game_temp.player_new_direction = $game_player.direction
    # Prepare for transition
    Graphics.freeze
    # Set transition processing flag
    $game_temp.transition_processing = true
    $game_temp.transition_name = ""

    This is how events do it
     
    Back
    Top