Quote:
Originally Posted by Lateralus
4th offset % 8 gives you the direction the character is moving in.
|
Actually.... that changed back in 5165 yet no one ever changed it which is why steed walk has always been ****** up on every public source.
Fang removed the actual full guide to how it's setup because of harrassment but the picture he made is still in the thread.
Basically the speed 'bool' is no longer a bool and now controls walking running and riding. The directions now allow for more values to let riding cover more than 1 direction at once.
Because of that you use % 24 not % 8 like everyone has been using for ages.
As dev states a few posts into the thread... the (by FAR) most efficient/simplest way to write this is using an array holding the coords themselves.
That way you can just pull direction via dir = direction % 24 and then select from the array via...
X += deltax[dir];
Y += deltay[dir];
with some dmap checks obviously.