- 3
- Posts
- 4
- Years
- Seen Aug 5, 2022
I'm relatively new to the rom hacking scene. Apologies if a similar problem has been answered elsewhere but I've scoured the forums and can't seem to find a solution. What I'm trying to do is set a script in Emerald on the road between Victory Road and Ever Grande where Steven approaches you, battles you, and then leaves. For the most part, it works: his sprite starts hidden due to another tile I set, he approaches when you step on the trigger tile, the battle commences, and he says his ending dialogue. The issue is when he leaves; no matter how I try and remove his sprite, afterwards the camera will jump a few tiles to the right and my player sprite will disappear. I am unable to move, but I can still access the menu and use Fly to escape. Here is the script I'm using:
I initially had the fadescreen replaced with Steven moving up and offscreen (reverse of @movementsA), but when I did this the camera followed him up until he disappeared and the aforementioned problem would happen, though the overworld would also be a bit glitched. I tried using moveoffscreen to no avail, thought I may have been using that one incorrectly. I also tried rearranging some of the latter lines, such as putting hidesprite in between the fadescreens. Everything else is working as intended; after I Fly away his sprite remains hidden, and the setvar works to not trigger the script again. (Also worth noting, after the battle my avatar will briefly appear as male before switching back to female. Not sure if this is related). I'm at a loss, so any help would be much appreciated.
Code:
#dynamic 0x800000
#org @main
lockall
showsprite 0x1
clearflag 0x2B3
applymovement 0x1 @movementsA
waitmovement 0x0
faceplayer
msgbox @beforefight 0x6
trainerbattle 0x3 0x324 0x0 @defeatfight
msgbox @afterfight 0x6
fadescreen 0x1
fadescreen 0x0
hidesprite 0x1
setflag 0x2B3
setvar 0x40F7 0x1
releaseall
end
#org @beforefight
= Steven: Hello, [player].\nCongratulations on making it\lthrough Victory Road.\pYou know, ever since we first met\nat Granite Cave, I thought there\lwas something special about you.\pWe may have fought together at the\nMossdeep Space Center, but I have\lyet to face you myself.\pSo, as the ex-champion, show me\nthat you're worthy of challenging\lthe Pokémon League!
#org @defeatfight
= Interesting.
#org @afterfight
= Steven: Wonderful! You certainly\nhave what it takes to become the\lChampion.\pGo forth, and I wish you the best\nof luck on your challenge!
#org @movementsA
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0xFE
I initially had the fadescreen replaced with Steven moving up and offscreen (reverse of @movementsA), but when I did this the camera followed him up until he disappeared and the aforementioned problem would happen, though the overworld would also be a bit glitched. I tried using moveoffscreen to no avail, thought I may have been using that one incorrectly. I also tried rearranging some of the latter lines, such as putting hidesprite in between the fadescreens. Everything else is working as intended; after I Fly away his sprite remains hidden, and the setvar works to not trigger the script again. (Also worth noting, after the battle my avatar will briefly appear as male before switching back to female. Not sure if this is related). I'm at a loss, so any help would be much appreciated.