Quote:
Originally Posted by Nevik_9191
.
|
Oh man. That is very spaghetti scripting there.
I think your issue may have something to do with relying on PLAYERFACING to trigger your player's movement, which btw I think is a weird thing to do in a script anyway. Usually, you just allow the player to move the player on their own, not force them to move in a direction. That's just a minor game design critique for you, though. PLAYERFACING (var 0x800C in FireRed) only updates when you press the A button, so you can't reliably use it in event tiles like this.
I think you should rewrite this event, and use a single var instead of flags for the conditions. Tile scripts are more suited to var use anyway! I think it would look something like this:
(This is in XSE format, and assumes your script uses var 4001, a temp var used in events like the Safari Zone entrance scripts)
Code:
#org @event
lockall
compare 0x4050 0x3
if 0x4 goto @finished
compare 0x4050 0x2
if 0x1 goto @afterwarp
compare 0x4050 0x1
if 0x1 goto @staycave
msgbox @voice 0x4 'This is a preference of mine, used with closeonkeypress
closeonkeypress
setvar 0x4001 0x1
releaseall
end
#org @afterwarp
msgbox @serious 0x4
closeonkeypress
setvar 0x4001 0x1
releaseall
end
#org @afterwarp
msgbox @water 0x4
closeonkeypress
setvar 0x4050 0x2
setvar 0x4001 0x1
releaseall
end