PHP Code:
function MoveTo( newx,newy ) {
temp.angle = getangle((newx - this.x),(newy - this.y));
this.xvel = cos(temp.angle);
this.yvel = sin(temp.angle);
this.x += this.xvel;
this.y -= this.yvel;
this.dir = getDir((newx - this.x),(newy - this.y));
this.chat = "My dir is " @ this.dir;
}
Alright that's what I'm using now. The movement still works fine but the direction still returns zero. I'm thinking maybe this command is only usable on the clientside?