• 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.

Replace FLY with an Item

94
Posts
11
Years
    • Seen May 4, 2018
    Hello all. I'm trying to replace Fly with an item but with no success. I tried copying the coding from HiddenMoves into an item (a Honey just to try out). But every time I use it, either I get an error, or nothing at all happens. I chose Honey cause it works on pbSweetScent, I figured if I could make a "pbFly" it would work, but I failed to define it. Can you guys help me out? Thanks in advance!
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    What's the error?
    Show us what you done.
    This gives us nothing to help you, on.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen yesterday
    Fly isn't a thing you just use. You first need to choose a destination, and by default that's done at the bottom of PokemonParty. More specifically, it's this code:

    Code:
                  scene=PokemonRegionMapScene.new(-1,false)
                  screen=PokemonRegionMap.new(scene)
                  ret=screen.pbStartFlyScreen
                  if ret
                    $PokemonTemp.flydata=ret
                  end
    It should be perfectly possible to make an item effect containing this code and the actual Fly script (basing it off Honey is fine; its UseFromBag should next 2 so that the item isn't consumed).

    Unless the item is a helicopter or some kind of pocket plane, it might not make sense, though.
     
    94
    Posts
    11
    Years
    • Seen May 4, 2018
    @Maruno
    Oh, thanks! =D

    I would have never figure out that's the code I needed.

    @Nickalooose and Evil Arms
    Sorry, I guess I should have posted those. Maruno's advice has done the trick so it's pointless to show you now. About the badge, if you mean it didn't work because I didn't have it, it should have, because I was testing on Debug Mode. Also, I didn't even copy the lines that ask for the bagde. Nevertheless thank you both for replying.
     
    Back
    Top