Quote:
Originally Posted by fowlplay4
If you're moving the npc on the server-side you need to use findnearestplayers or some other kind of loop and a bounds check like callimuc has posted. I.e.
PHP Code:
for (temp.p: players) { with (temp.p) { if (this.x in |player.x, player.x+3| && this.y in |player.y, player.y+3|) { player.chat = "The NPC touched me!"; } } }
|
Wouldnt it be
PHP Code:
for (temp.p: players) {
with (temp.p) {
if (thiso.x in |x, x+3| && thiso.y in |y, y+3|) {
temp.p.chat = "The NPC touched me!";
}
}
}
?