• 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] help with checkflag

  • 7
    Posts
    5
    Years
    • Seen Oct 3, 2019
    I am trying to make a script to turn the player around if they try to enter a door I placed in Oak's lab (Fire Red). The script seems to work in the beginning, before trying to leave Pallet Town, but after Oak brings you to his lab it no longer works. Here is my code so far.
    Spoiler:
    I am attempting to use flag 0x2B to check if Oak is there or not, as that is his ID in that map. To summarize, the issue I'm having SEEMS to be that after this line
    Code:
    if 0x1 goto @gone
    if the flag is set (Oak is hidden), it operates as intended. If the flag is not set (Oak is visible in the lab), the script appears to do nothing which I take to mean that it terminates after reading the if statement.
    Any help or suggestions are appreciated!
     
    Last edited:
    After a bit more research while developing other parts of my hack, I realized the problem. This tile script I placed was using var 0x4050, which the value is changed to 0x1 after the first time you meet Prof Oak. (found that tidbit here

    Since the tile script stops working when the value is changed, it gave me the impression that the problem was with the flag or the code logic. In any case, I switched to a different var and the problem was resolved. (at least for now)
     
    Back
    Top