Page 1 of 1

detect npc location

Posted: November 18th, 2016, 5:52 am
by hmmcrunchy
Is it possible to check during chat with an NPC if the NPC is within a certain distance of a point.

If they are you can zap to a subroutine if not they zap to another routine

Re: detect npc location

Posted: November 18th, 2016, 6:16 am
by mcmonkey
(Topic moved to correct location)

- if <npc.location.distance[<npc.anchor[farPoint]>]> < 10 { will pass if the NPC is within 10 blocks of 'farPoint' anchor. Swap variables and tags freely to whatever you need. The location.distance[...] bit is the key.

Re: detect npc location

Posted: November 18th, 2016, 6:53 am
by hmmcrunchy
(thanks)

fantastic once again thank you.

if you are interested I'm doing characters that say different things if at home to at their shops