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