Hi, there.
So, I'm doing a Level Script, and it seems to be fickle.
There's a Scientist inside Mt. Moon, who has this script.
[/SPOILER]
This is meant to avoid having the level script activate early. The script itself is meant to trigger after the Gym Battle against the Cerulean City Gym Leader, who runs off upset at the loss. Her father, the Rocket Grunt in front of the gym, then immediately runs after you, and asks you what happened.
However, after I talk to the man, occasionally what happens is that upon entering Cerulean City, the game freezes and produces the sound that you make when you yank out the cartridge while the game is still playing.
After resetting, however, when I talk to the scientist, and enter the city, everything's fine, and the script runs perfectly. After I beat the Gym Leader, the gym Leader runs off, and the father does his thing, and everything after works perfectly, using the var 4064 for the level script. Sometimes tho, resetting after that freezes the game sometimes.
Initially, I thought it was because I accidentally activated some wild battle, because that's what happened the first time. After resetting and avoiding the grass, it worked perfectly. However, that was quickly disproven by the third reset, where the script failed and the game froze once more.
Any help would be lovely.
Here's the level script itself.
And here's the Gym Leader's script. Flag 0x271 is meant for the guards blocking Cerulean City (not relevant to the problem I think).
I hope it's not something like the var, because I thought 0x4064 was safe. If it is, that would be a wonderfully easy fix, but I don't get why it's fickle when it works occasionally.
__________________
Current Challenges
Ultimate Monocolor Red Challenge - Completed - 6/14/2018
Games: Blue, HeartGold , Ruby , Platinum, White
Psychic Monotype Challenge
Games: LeafGreen (Completed), Gold (Completed), Sapphire