Hiya
I'm seeking advise-
I'm making an NPC which will kill the player in front of it within a certain distance
However, when I use something like this
HTML Code:
for (temp.pl: players) {
if (temp.pl.x in |this.x + 1.5, this.x + 1.5 + (vecx(this.dir) * temp.view)| &&
temp.pl.y in |this.y + 1.5, this.y + 1.5, (vecy(this.dir) * temp.view)|) {
temp.pl.ani = "dead";
}
}
This works if the NPC is facing down and right, but facing up or left it won't work. Any ideas?