I'm currently working on my following and handling it server sided but I'm coming across a few issues. As I have extremely little knowledge of how walking works in a rsps, I'm not sure what's going wrong so maybe someone can tell me.

I took a piece of code from the Walking class that looked like it would be useful and then changed it slightly so I could make it work with following.

[code=java]
if(++c.newWalkCmdSteps > c.walkingQueueSize) {
c.newWalkCmdSteps = 0;
return;
}
c.getNewWalkCmdX()[0] = c.getNewWalkCmdY()[0] = 0;

for(int i = 1; i < c.newWalkCmdSteps; i++) {
c.getNewWalkCmdX()[i] = otherPlayer;
c.getNewWalkCmdY()[i] = otherPlayer2;
}

for(int i1 = 0; i1 < c.newWalkCmdSteps; i1++) {
c.getNewWalkCmdX()[i1] += otherPlayer-c.getMapRegionX()*8;
c.getNewWalkCmdY()[i1] += otherPlayer2-c.getMapRegionY()*8;
}

[/code]

Surprisingly, this sort of works... Sometimes it gives errors in the run window like invalid waypoint or something, but it still follows the player nicely.

The problem is that this only happens when the following packet is sent. The follower runs to the other player and stands behind him like he's ready to follow, and that's it.

So yeah it would need to go under process or something so that it checks if you're following someone and constantly updates the new position. When I put it under process I get nullpointers, and when I submit new ticks it just walks behind the player and that's it.

Anyone give me some pointers?