- 5,256
- Posts
- 17
- Years
- Age 27
- Leicester, UK
- Seen Mar 31, 2025
I'm hacking pokemon emerald and I made an event where a team aqua member blocks your path.
you battle him, he runs away and you can get trough, but I have a problem.
After the battle, he runs away like he's supposed to, his sprite also dissapears, but whenever you re-enter the map, the aqua member is on the path again...
Aqua member script: note: the person event ID was set to 1 (0001)
Spoiler:
'-----------------------
#org 0x35D25F
lock
faceplayer
msgbox 0x835D2A6 '"\c\h01ÔHuh!?\pYou still want to com..."
callstd 0x6
trainerbattle 0x1 0x12 0x0 0x835D3C4 0x835D400 0x835D281
end
'-----------------------
#org 0x35D281
msgbox 0x835D2FD '"\c\h01ÔAergh! Annoying little\npest..."
callstd 0x6
applymovement 0x1 0x835D299
waitmovement 0x1
hidesprite 0x1
setflag 0x5004
release
end
'-----------
' Movements
'-----------
#org 0x35D299
#raw 16 'Slide Up
#raw 16 'Slide Up
#raw 16 'Slide Up
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 17 'Slide Left
#raw 16 'Slide Up
#raw 16 'Slide Up
#raw FE 'End of Movements
'---------
' Strings
'---------
#org 0x35D2A6
= \c\h01ÔHuh!?\pYou still want to come trough here?\pYou persistent little RATTATA!
#org 0x35D3C4
= \c\h01ÔGuess I will need to\nteach you a little lesson!
#org 0x35D400
= Ah darn, not good!
#org 0x35D2FD
= \c\h01ÔAergh! Annoying little\npest...\pDon't mess with our operations!\pThere are tons of us up ahead, a\nbrat like you wouldn't be able to\ldo anything against us!\pTime to warn my companions!
Map script Script type: 03 (On entering map/on menu close)
Spoiler:
'-----------------------
#org 0x335FED
checkflag 0x5004
if 0x1 goto 0x8335FFF
if 0x0 goto 0x8336008
end
'-----------------------
#org 0x335FFF
hidesprite 0x1
end
'-----------------------
#org 0x336008
showsprite 0x1
end
I'm trying to find out why the sprite doesn't want to be hidden when you enter the map for hours now...
The flag 0x5004 is highly unsafe: I recommend staying within the range of 0x200 to 0x2FF. Refer to this document for more information on safe flags and variables.
You also seem to be using an outdated syntax for XSE: I recommend updating to version 1.1.1 by downloading it here.
Your script itself seems to be fine, although the level script is unnecessary, as the game will automatically hide or show Person events depending on the status of their Person ID flag.
Finally, this post belongs in the Script Help Thread, so I've moved it there.