View Single Post
  #13  
Old 03-14-2005, 05:05 AM
Deek2 Deek2 is offline
Registered User
Join Date: May 2002
Location: Springfield, Missouri
Posts: 1,578
Deek2 is on a distinguished road
Okay, so I've figured out the distance and the angle
NPC Code:
for (this.p=0;this.p<playerscount;this.p++){
this.distance=((playerx-players[this.p].x)^2 + (playery-players[this.p].y^2))^.5;
this.angle=arctan((playerx-players[this.p].x)/(playery-players[this.p].y^2));
}


Or at least I think.
The difficulty I'm encountering now is how to actually use the variables that I created. I don't know how to even figure out which certain quadrants the players fall into.
Reply With Quote