This is most likely a bug but I thought I would just post it here first.
NPC Code:
if ( created ){
this.speed = 0.5;
message Ask me to "Come Here".;
}
if ( playerchats ){
if ( strequals( #c , Come Here ) ){
this.movex = playerx + vecx( playerdir ) * 2;
this.movey = playery + vecy( playerdir ) * 2;
move();
message Coming sir.;
}
}
function move(){
this.dx = this.movex - x;
this.dy = this.movey - y;
this.dis = ( this.dx ^ 2 + this.dy ^ 2 ) ^ 0.5;
this.time = this.dis * this.speed;
setcharani walk,;
move this.dx , this.dy , this.time , 1 + 4 + 8 + 16;
}
if ( movementfinished ){
if ( x != this.movex || y != this.movey ){
message A wall is in the way.;
}else{
message Here.;
}
setcharani idle,;
}
//#CLIENTSIDE
if ( created ) {
// Initialize the attributes
showcharacter;
setcharprop #3 , head212.png;
setcharprop #C0 , orange;
setcharprop #C1 , black;
setcharprop #C2 , black;
setcharprop #C3 , black;
setcharprop #C4 , black;
setcharprop #2 , no-shield.png;
setcharprop #n , Bob;
shieldpower = 1;
dir = 2;
}
This is a basic npc, it uses the move command to come to you when you ask it too. It is serverside.
It works fine offline. But online it will stop moving, but continue to walk at a standstill. And when called to move again it will warp to the spot it was trying to get to and continue from there.
I really want the move command to work here. :-/ Suggestions? Common ailments? Have you encountered the same?