Lunacrest
has ninja'd: 2600
- 152
- Posts
- 14
- Years
- Sky Pillar
- Seen Sep 19, 2022
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.
#org 0x8065EE
msgbox @hope 0x2
setvar 0x4064 0x1
end
#org @hope
= I hope to see you on the other side\n of the mountain!
[/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.
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:
#org 0x8065EE
msgbox @hope 0x2
setvar 0x4064 0x1
end
#org @hope
= I hope to see you on the other side\n of the mountain!
[/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.
Spoiler:
#org 0x8055CD
lock
applymovement 0x7 0x880560A
waitmovement 0x0
msgbox 0x8805623 MSG_FACE '"What happened? I just saw my\ndaug..."
applymovement 0x7 0x8805615
waitmovement 0x0
msgbox 0x88056DB MSG_NORMAL '"Ashmi, don't you worry! I'm\ncomin..."
applymovement 0x7 0x8805618
waitmovement 0x0
hidesprite 0x7
setflag 0x270
setvar 0x4064 0x1
release
end
'---------
' Strings
'---------
#org 0x805623
= What happened? I just saw my\ndaughter, Ashmi, run out of the\lGym in tears!\p...\n...\pOh, she lost? It makes me sad when\nshe gets like this. It's time for\lme to do my thing as her dad!
#org 0x8056DB
= Ashmi, don't you worry! I'm\ncoming!
'-----------
' Movements
'-----------
#org 0x80560A
#raw 0x3 'Face Right
#raw 0x62 'Exclamation Mark (!)
#raw 0x0 'Face Down
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements
#org 0x805615
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements
#org 0x805618
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements
lock
applymovement 0x7 0x880560A
waitmovement 0x0
msgbox 0x8805623 MSG_FACE '"What happened? I just saw my\ndaug..."
applymovement 0x7 0x8805615
waitmovement 0x0
msgbox 0x88056DB MSG_NORMAL '"Ashmi, don't you worry! I'm\ncomin..."
applymovement 0x7 0x8805618
waitmovement 0x0
hidesprite 0x7
setflag 0x270
setvar 0x4064 0x1
release
end
'---------
' Strings
'---------
#org 0x805623
= What happened? I just saw my\ndaughter, Ashmi, run out of the\lGym in tears!\p...\n...\pOh, she lost? It makes me sad when\nshe gets like this. It's time for\lme to do my thing as her dad!
#org 0x8056DB
= Ashmi, don't you worry! I'm\ncoming!
'-----------
' Movements
'-----------
#org 0x80560A
#raw 0x3 'Face Right
#raw 0x62 'Exclamation Mark (!)
#raw 0x0 'Face Down
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements
#org 0x805615
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements
#org 0x805618
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements
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).
Spoiler:
#org 0x80585B
lock
faceplayer
trainerbattle 0x1 0x19F 0x0 0x880588F 0x8805A80 0x8805872
release
end
'---------------
#org 0x805872
msgbox 0x8805A99 MSG_NORMAL '"No! This isn't fair! My Pokémon\na..."
fadescreen 0x1
hidesprite LASTTALKED
setflag 0x291
fadescreen 0x0
setflag 0x271
setvar 0x4064 0x0
release
end
'---------
' Strings
'---------
#org 0x80588F
= It's good to see a new face in\nhere!\pI'm Ashmi, the Psychic-type Gym\nLeader of Cerulean City.\pThe difference between the rest of\nTeam Rocket and me is that I\ldidn't just join it, as if it were\lsome club.\pI was born into it. My father's\none of the famous bosses of Team\lRocket, and I've been honing my\lskills ever since I was young in\lprotecting the honor to my name.\pNow, my Psychic-type Pokémon are\nboth in peak physical and mental\lcondition.\pHow can you handle such a\ndevastating combination?
#org 0x805A80
= W-What? This can't be!
#org 0x805A99
= No! This isn't fair! My Pokémon\nare far stronger than yours!\pYou don't deserve a badge! You\ndeserve a smackdown!
lock
faceplayer
trainerbattle 0x1 0x19F 0x0 0x880588F 0x8805A80 0x8805872
release
end
'---------------
#org 0x805872
msgbox 0x8805A99 MSG_NORMAL '"No! This isn't fair! My Pokémon\na..."
fadescreen 0x1
hidesprite LASTTALKED
setflag 0x291
fadescreen 0x0
setflag 0x271
setvar 0x4064 0x0
release
end
'---------
' Strings
'---------
#org 0x80588F
= It's good to see a new face in\nhere!\pI'm Ashmi, the Psychic-type Gym\nLeader of Cerulean City.\pThe difference between the rest of\nTeam Rocket and me is that I\ldidn't just join it, as if it were\lsome club.\pI was born into it. My father's\none of the famous bosses of Team\lRocket, and I've been honing my\lskills ever since I was young in\lprotecting the honor to my name.\pNow, my Psychic-type Pokémon are\nboth in peak physical and mental\lcondition.\pHow can you handle such a\ndevastating combination?
#org 0x805A80
= W-What? This can't be!
#org 0x805A99
= No! This isn't fair! My Pokémon\nare far stronger than yours!\pYou don't deserve a badge! You\ndeserve a smackdown!
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.
Last edited: