View Single Post
  #5  
Old 08-18-2003, 10:50 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
kai posted something that didn't require sin/cos besides for like 2 vars he created using it...I think I have it somewhere...

NPC Code:

if(playerenters){
this.rad=2.5;
this.x=0;
this.y=this.rad;
this.anginc=16/360;
this.s=sin(this.anginc);
this.c=cos(this.anginc);
timeout=0.05;
}
if(timeout){
this.x2=this.x*this.c-this.y*this.s;
this.y2=this.y*this.c+this.x*this.s;
this.x=this.x2;
this.y=this.y2;
x = 30 + this.x;
y = 30 + this.y;
timeout=0.05;
}


I might've edited it myself a little bit but oh well
Reply With Quote