[Opensim-users] Sensors are not detecting NPC avatars on git r/17830

Marcus Llewellyn marcus.llewellyn at gmail.com
Fri Jan 20 11:38:07 UTC 2012


On 1/19/2012 5:57 PM, Justin Clark-Casey wrote:
>
> Either way, what is missing at the moment is a way to actually tell if 
> a particular agent is an NPC.  One possibility is to make 
> llGetOwnerKey() return an owned NPC's owner.  For an unowned NPC, this 
> would need to return UUID.Zero - I'm not sure if there's a problem 
> disambiguating between an unowned NPC and a situation where no entity 
> with the ID is found.
>

The problem I have with this approach is that it seems a bit obscure. 
Using llGetOwnerKey() is not going to be an approach that many scripters 
will intuitively take, I think. Ideally, we could add an AGENT_NPC 
constant to llGetAgentInfo(). But this is impractical since we have no 
way of knowing what constants LL might choose to add in the future, and 
there is little or no incentive for them to respect our additions. Plus 
it appears to use bit flags, and there's only so many bits to go around.

I do rather like the idea of the addition of a simpler, more 
straight-forward function like osGetAgentType(). In addition to being 
easy to use and understand, it offers the potential to detect and 
identify things like bots or other specially flagged agents, as well as 
unanticipated agent types that might be added in the future.

I tend to lean toward the opinion that, where practical, most scripting 
functions (and sensors are probably a sensible exception) should be 
agent-type agnostic, and to allow scripts to make the differentiation 
only when they choose to do so. From what I've seen from people working 
with NPCs, there is a very real expectation that most scripts that work 
on a user agent will also work on an NPC. This is an expectation they 
rely on, even when they shouldn't. I've already had to warn a couple 
scripters about using just any poseball script with an NPC, and to be 
certain that any poseball script explicitly stops any animations it starts.

Apologies if my suggestions are naive. I do realize that NPCs can be 
awkward for OpenSim devs, and that you're dealing with square pegs and a 
round hole. It can't be simple to decide when to try to just hammer it 
in, when to try to sand off the edges, or when to make a new square 
hole, all while trying to keep things as clean as possible.

Marcus



More information about the Opensim-users mailing list