This is indeed correct. It means that sensors using the LSL AGENT type will not detect NPCs. To detect an NPC you must
specify the currently OpenSim-only NPC constant. This has been true since 7518b07 (Fri Jan 6 22:35:06 2012).
One reason for doing this is because the sensor limit is 16 and one doesn't want the return to be overwhelmed by NPCs.
It means that sensor using scripts not designed with NPCs in mind (both in the past and the future) won't work with NPCs
without alteration. It strikes me that sometimes this is a disadvantage (e.g. a light that should come on when it
detects any presence) but for other items an advantage (e.g. non-NPC aware radars that wouldn't be designed to pick them
up anyway).
So one option is to change the default so that AGENT will pick up NPCs. However, this is a problem with the 16 avatar
sensor limit. Even if this is turned up, it might then cause script problems (e.g. ones designed to work with only 16
avatars).
Another slightly messy option is to provide something like an OS_NPC_SHOW_AS_AGENT option to osNpcCreate() that will
show such NPCs as agents. I'm favouring this option right now.
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.
I'm interested if people have any thoughts about this.
On 18/01/12 23:43, Trinity wrote:
try using the flag NPC
On Wed, Jan 18, 2012 at 7:21 AM, Chris <[email protected]
<mailto:[email protected]>> wrote:
Hello all. I'm having a bit of trouble getting my sensor scripts to detect
NPC's now on git r/17830.
In my script I have tried using
npc = osNpcCreate(firstname, lastname, pos, npc_note, OS_NPC_NOT_OWNED);
as well as
npc = osNpcCreate(firstname, lastname, pos, npc_note, OS_NPC_CREATOR_OWNED);
to no avail. (firstname, lastname, pos, and npc_note are variables I've
declared at the top of my script)
The NPC shows up fine and seems to react the way I expect it to except it
won't show up in any of my scripts that
utilize sensors. The sensor scripts will detect a non NPC avatar just fine
and interact with a non NPC avatar the
way I scripted it to. I was not having this issue prior to the git commits
that introduced owner checking on the
NPCs. I know that for a little while this was disabled but it was
reintroduced in commit d27dd3 (r/17792).
Am I doing something wrong?
Thanks!
--
OpenSim: 9 Region Standalone on 0.7.3 Dev
Physics: Open Dynamics Engine
OS: Windows XP 32 Bit
CPU: AMD Phenom II X4 840 3.2 GHz
Memory: 3 GB DDR3
Database: MySQL 5.1.11
_________________________________________________
Opensim-users mailing list
[email protected] <mailto:[email protected]>
https://lists.berlios.de/__mailman/listinfo/opensim-users
<https://lists.berlios.de/mailman/listinfo/opensim-users>
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
--
Justin Clark-Casey (justincc)
http://justincc.org/blog
http://twitter.com/justincc
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users