Karl
Creator of Pokémon Darkfire
- 169
- Posts
- 14
- Years
- Seen May 7, 2025
Facing a problem with my XSE script. I wonder if anyone could help me. I'm hacking Pok?mon Emerald.
My plan is to get the player to jump in a direction depending on where they are facing when they interact with the script.
I'm using an orange signpost script in AdvanceMap (not a person event or green tile), and I'm getting the @failed message when I compile the following script:
I'm 99% sure the comparefarbytetobyte value of 0x2036E58 is wrong (I copied this from a working FR script but have no idea how to find the right value).
I have tried copying var 0x8000 and comparing, and I've also tried the standard PLAYERFACING command, but both don't work on an orange script box (on a person event it works fine).
If anyone knows a way to get this to work I'd appreciate it!
My plan is to get the player to jump in a direction depending on where they are facing when they interact with the script.
I'm using an orange signpost script in AdvanceMap (not a person event or green tile), and I'm getting the @failed message when I compile the following script:
Spoiler:
Code:
#clean
#dynamic 0xB9B9E6
#org @start
lock
comparefarbytetobyte 0x2036E58 0x1
if 0x1 call @up
comparefarbytetobyte 0x2036E58 0x2
if 0x1 call @down
comparefarbytetobyte 0x2036E58 0x3
if 0x1 call @nope
comparefarbytetobyte 0x2036E58 0x4
if 0x1 call @nope
msgbox @failed 0x6
release
end
#org @up
msgbox @prompt 0x5
compare LASTRESULT 0x1
if 0x1 goto @ju
release
end
#org @nope
msgbox @no 0x6
release
end
#org @down
msgbox @prompt 0x5
compare LASTRESULT 0x1
if 0x1 goto @jd
release
end
#org @ju
pause 0x10
release
applymovement 0xFF @jumpup
sound 0xA
checksound
waitmovement 0x0
end
#org @jd
pause 0x10
release
applymovement 0xFF @jumpdown
sound 0xA
checksound
waitmovement 0x0
end
#org @prompt
= There is a small gap between the water.\nWould you like to jump across it?
#org @no
= Sorry\hb0\nYou can't do that now.
#org @jumpup
#raw 0xD
#raw 0xFE
#org @jumpdown
#raw 0xC
#raw 0xFE
#org @failed
= Script error.
I'm 99% sure the comparefarbytetobyte value of 0x2036E58 is wrong (I copied this from a working FR script but have no idea how to find the right value).
I have tried copying var 0x8000 and comparing, and I've also tried the standard PLAYERFACING command, but both don't work on an orange script box (on a person event it works fine).
If anyone knows a way to get this to work I'd appreciate it!