Quote:
Originally Posted by DubTheNarwhals
This script is a script not a person event and every time I step on it the game freeze.
heres the script:
#dynamic 0x800000
#org @start
checkflag 0x202
if 0x1 goto @end
lock
msgbox @t1 0x6
applymovement 0xFF @m1
waitmovement 0x0
release
end
#org @m1
#raw 0x8
#raw 0xFE
#org @t1
= Looks like these pokemon are\nfighting, better back off.
#org @end
end
It's suppose to make the player move back when they step on the script if the flag is clear. If the flag not clear it's suppose to do nothing. How can I fix this?
|
I don't know if I'm right, but I think your @end cannot be empty, then place the "lock" before the "checkflag" instead after, then place "release" at your @end, and test it.
EDIT:
I've found something useful:
applymovement
Arguments:
byte-or-variable index
pointer movements
Applies the movement data at movements to the specified (index) Person event. Also closes any standard message boxes that are still open.
Indices 0xFF and 0x7F refer to the player and the camera, respectively.
Running this command from a Script event will crash the game unless that Script event's "Unknown" field (in AdvanceMap) is "$0003" and its "Var number" field refers to a valid script variable.