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

Replace FLY with an Item

  • 93
    Posts
    12
    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!
     
    What's the error?
    Show us what you done.
    This gives us nothing to help you, on.
     
    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.
     
    @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