Thread: getDir()
View Single Post
  #4  
Old 07-29-2008, 11:28 PM
The_Kez The_Kez is offline
N-Pulse Asst. Manager
The_Kez's Avatar
Join Date: Dec 2007
Posts: 106
The_Kez is on a distinguished road
Send a message via MSN to The_Kez
PHP Code:
function MoveTonewx,newy ) {
  
temp.angle getangle((newx this.x),(newy this.y));
  
this.xvel cos(temp.angle);
  
this.yvel sin(temp.angle);
  
this.+= this.xvel;
  
this.-= 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?
Reply With Quote