- 21
- Posts
- 5
- Years
- Seen Aug 6, 2022
Hello, again. I'm dealing with the last real hurdle in getting my game wrapped up. I have a number of legendary encounters that I put in copying the script from existing ones in the game and making changes. It all seems to work fine, with one little issue. If I catch the legendary, the sprite doesn't disappear. It does if I KO it, or if I run from the battle. But if I catch it, the sprite doesn't clear and remains interactable. I am very new to scripting, so I'm sure that I just screwed something up there, or maybe it's with the person ID I'm using (I've tried using the same as Mewtwo, Zapdos, and the same number as the flag used in the script and all had the same result). For reference, here is one of the scripts I have for an encounter with Celebi.
#org 0xB00750
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
setwildbattle 0xFB 0x1E 0x0
checksound
cry 0xFB 0x2
preparemsg 0x8B20000 '"Biii!"
waitmsg
waitcry
pause 0x1A
playsong 0x156 0x0
waitkeypress
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x8B50400
compare LASTRESULT 0x4
if 0x1 goto 0x8B50D00
compare LASTRESULT 0x5
#3# if 0x1 goto 0x8B50D00
setflag 0x204
release
end
'---------------
#org 0x1A7AE0
release
end
'---------------
#org 0xB50400
setflag 0x204
goto 0x81A922D
'---------------
#org 0xB50D00
setvar 0x8004 0xFB
goto 0x81A9236
'---------------
#org 0x1A922D
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end
'---------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 MSG_KEEPOPEN '"The [buffer1] fled!"
release
end
'---------
' Strings
'---------
#org 0xB20000
= "Biii!"
#org 0x1A63C4
= The [buffer1] fled!
So what am I missing here?
#org 0xB00750
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
setwildbattle 0xFB 0x1E 0x0
checksound
cry 0xFB 0x2
preparemsg 0x8B20000 '"Biii!"
waitmsg
waitcry
pause 0x1A
playsong 0x156 0x0
waitkeypress
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x8B50400
compare LASTRESULT 0x4
if 0x1 goto 0x8B50D00
compare LASTRESULT 0x5
#3# if 0x1 goto 0x8B50D00
setflag 0x204
release
end
'---------------
#org 0x1A7AE0
release
end
'---------------
#org 0xB50400
setflag 0x204
goto 0x81A922D
'---------------
#org 0xB50D00
setvar 0x8004 0xFB
goto 0x81A9236
'---------------
#org 0x1A922D
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end
'---------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 MSG_KEEPOPEN '"The [buffer1] fled!"
release
end
'---------
' Strings
'---------
#org 0xB20000
= "Biii!"
#org 0x1A63C4
= The [buffer1] fled!
So what am I missing here?