Thread: move
View Single Post
  #5  
Old 01-31-2004, 09:10 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
before I forget, it would be a better idea to set dx and dy variables and use those instead of making all those sin and cos calculations

NPC Code:

dx = cos(this.angle);
dy = sin(this.angle);
while (i<this.dis){
newx = gox + dx;
newy = goy - dy;
if (onwall(newx+1.5,newy+2) || onwater(newx+1.5,newy+2))
break;
gox = newx;
goy = newy;
i++;
}

__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote