Frans Charming
You only need one Frans
Join date: 28 Jan 2005
Posts: 1,847
|
04-04-2005 16:37
Hi, i could use some help, with the the llSensor() function. When i do this: llSensor(objectName, NULL_KEY, AGENT|ACTIVE|PASSIVE|SCRIPTED, 25, PI) It won't find objects without a script. But when i do this: llSensor(ObjectName, NULL_KEY, PASSIVE, 25, PI) It will find objects without a script.
Shouldn't it find all objects with the first? Why doesn't it, a bug? And is the only workaround calling sensor twice?
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
04-05-2005 01:31
This response was incorrect. Please ignore.Original Text: From: someone Simply put, sensors don't seem to like "or" operands in that manner. It's not a bug so much as... well, a temperamental command.
I've been asking for more advanced sensor stuffs for some time.
_____________________
---
|
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
04-05-2005 05:20
I think (but haven't tested) that ACTIVE is defined as a bit mask (e.g. 0x0a) and PASSIVE is its bitwise negation so that (ACTIVE | PASSIVE) == ACTIVE.
Thus you'd need two sensors, one to grab ACTIVE and one for PASSIVE, but check my guess first and please be sparing in your use of sensors as the LSL Hackers' Guide to Lag Reduction recommends.
|
Frans Charming
You only need one Frans
Join date: 28 Jan 2005
Posts: 1,847
|
04-05-2005 14:01
Ok, thankyou guys. Maybe someone should write something in the lsl wiki about it.
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
04-06-2005 03:16
I have a sensor that so far has worked 100% reliably. I can't get to the code right now (I'm at work the code is online and at home, ah well), but I use AGENT | ACTIVE | PASSIVE as the elements and it has sucessfully tracked all three, and *touch wood* done so reliably across the upgrade.
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
04-06-2005 07:47
From: Frans Charming Hi, i could use some help, with the the llSensor() function. When i do this: llSensor(objectName, NULL_KEY, AGENT|ACTIVE|PASSIVE|SCRIPTED, 25, PI) It won't find objects without a script. But when i do this: llSensor(ObjectName, NULL_KEY, PASSIVE, 25, PI) It will find objects without a script.
Shouldn't it find all objects with the first? Why doesn't it, a bug? And is the only workaround calling sensor twice? This is the expected behavior of the SCRIPTED bitflag. Contrary to any intuitive thought, they created the SCRIPTED bitflag as a limiter; when you OR that into the flags the sensor is trying to detect, it filters out all non-scripted items. Just use ACTIVE|PASSIVE|AGENT, if you want to detect everything. ==Chris
|