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

[Script] help with checkflag

7
Posts
4
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:
    7
    Posts
    4
    Years
    • Seen Oct 3, 2019
    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