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

[Script] Checking if player is inside or outside for fly (Firered)

  • 1
    Posts
    2
    Years
    • Seen May 3, 2023
    I'm trying to create an item that replaces fly in the overworld. Using callasm 0x80C4EF9 in XSE, I can bring up the fly map and it works correctly except for one thing - the player is allowed to fly while inside.
    I can't find any info on this. I've googled every combination of words I could think of.
    I see in advance map that each map has a type in the header such as inside, underground, city etc. So if there's a way to check that in a script it should be pretty easy I would think.

    Thanks for any help, I've figure out 99% of what I need to do for my hack mostly because of this website.
     
    I'm trying to create an item that replaces fly in the overworld. Using callasm 0x80C4EF9 in XSE, I can bring up the fly map and it works correctly except for one thing - the player is allowed to fly while inside.
    I can't find any info on this. I've googled every combination of words I could think of.
    I see in advance map that each map has a type in the header such as inside, underground, city etc. So if there's a way to check that in a script it should be pretty easy I would think.

    Thanks for any help, I've figure out 99% of what I need to do for my hack mostly because of this website.

    SetUpFieldMove_Fly is the function the game uses to determine if you can fly. You could call it from your ASM or C code.
    The scripting engine itself doesn't have a convenient way to check whether you can fly, other than reading gMapHeader with one of the farbyte commands.
     
    Back
    Top