I was wondering if anyone could better explain
special 0x81 (the Load Walking script pointer command) to me and how to execute it properly. I think it might be a solution for making a race occur between a sprite in the game.
My idea is to apply a movement to the sprite of about 10 steps, move it to that permanent location, and then set a variable afterwards. What I want to use
special 0x81 for is to check with each movement of the player whether this (or other) variables are set, and if so, to apply another 10-step movement to the sprite.
By not applying a "waitmovement" afterwards, the player should be able to walk about freely as the sprite moves; but shorter movements are necessary, I think, because if you "outrun" or "underrun" the sprite so it can no longer be seen on the map, it reverts back to its primary location on the map, so the race can't continue.
So I'd like try to move the sprite only about ten steps, move it to that position permanently, and then force it to do another brief movement and move its position again, until it gets to the finish line. But to do this without the "waitmovement" command being used, I'd need something like
special 0x81 that activates whenever the player is walking (or else litter each tile of the entire map with scripts - ugh). I'm not sure if this would work, but I'd like to give it a try.
Does
special 0x81 need to be executed in a header? I tried this, with a script like this:
Code:
special 0x81
compare 0x6173 0x0
if 0x1 goto @go
compare 0x6173 0x1
if 0x1 goto @go2
@go would initiate the first set of movements for the sprite and move it to a new location with "movesprite2"; and @go2 would initiate a second set of movements and move it again. But I am doing something wrong, because no matter what the player is frozen and can't move, even with "waitmovement" commands used.
Is there something else I would need to add to the script, and am I right in using it as a header?
Any advice would be appreciated. :)