Individual update-ranges on a per-NPC-basis

If Wishes were UOX Coders, we'd be done by now ;P Post your wishes/suggestions for UOX3 changes/improvements here.
Post Reply
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Individual update-ranges on a per-NPC-basis

Post by Xuri »

EDIT 08/01/2022: A way to achieve this has been implemented for Items via the onMoveDetect() JS event. No support for NPCs yet though.

It would be very nice if I could define individual update-ranges for NPCs (for when they "notice" items and characters") - that would make it possible to make NPCs that triggered their scripts only if someone came within X tiles of them, or they came within X tiles of an item, for instance.

Examples of possible NPC-types one could create if this was possible:
-> Garbage-cleaners who remove any item (not locked down, not a corpse, not a decorative item, etc) once it got within three tiles of it.[/list]
-> QuestNPCs that would (on their own) initate conversations with players when they came close enough.[/list]
-> Monsters with varying ranges of "visibility"

I tried using the VISRANGE tag in races.dfn to define a race with visiblerange of 3, but the inRange JS event still got executed when the NPCs were 18 tiles (or whatever the default updaterange is) away from items. :|
-= Ho Eyo He Hum =-
Post Reply