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.