Difference between revisions of "Talk:LlSensor"

From Second Life Wiki
Jump to navigation Jump to search
(Question about changed behavior of agent scans)
Line 53: Line 53:
no longer seems to be true - if you search for an agent, you only get the agent, and not the object it's sitting on. (No clue when this changed, I only tried it for the first time tonight).
no longer seems to be true - if you search for an agent, you only get the agent, and not the object it's sitting on. (No clue when this changed, I only tried it for the first time tonight).
[[User:Redwood Rhiadra|Redwood Rhiadra]] 01:22, 2 October 2010 (UTC)
[[User:Redwood Rhiadra|Redwood Rhiadra]] 01:22, 2 October 2010 (UTC)
: Hi, this feature is definitely confusing, that is what CVS-5145 is, a request to make the behavior sensible and consistent. I will repeat the tests this weekend and see if it is broken in the same old way or if there are new ways too. --[[User:Cerise Sorbet|Cerise Sorbet]] 03:30, 2 October 2010 (UTC)

Revision as of 19:30, 1 October 2010


If PI/4 is a 45 degree cone: if the cone's axis is 1, does the base have a diameter of 2, or a diameter of ~0.82? --Asha Vultee 12:53, 19 November 2007 (PST)

Strictly speaking, it's not a cone. If you want an idea of what the shape will look like run the following script. -- Strife Onizuka 13:20, 19 November 2007 (PST)
float arc;

default
{
    state_entry()
    {
        llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SPHERE, 0, <0.,1.,0.>, 0.0, <0.,0.,0.>, <0.,arc/PI,0.>]);
    }
}

Agent?

Hey everyone, don't you think the "AGENT" flag should have a description along the lines of "This is used to find avatars only". rather than a blank description? I tried to add it myself, but I'm afraid I'm too newbie to understand the formatting... I couldn't find that particular table.—The preceding unsigned comment was added on 17:31, 23 June 2008 by Hikaru Dreadlow

Will do, the table is in a template (Template:LSL_Constants_Sensor) so that it can be included on llSensorRepeat too. -- Strife Onizuka 15:02, 23 June 2008 (PDT)

All Object Sensor?

Hey, can anyone tell me how to make an llSensor() that will scan for ANY object? For example, both physical and nonphysical, scripted and nonscripted, any combination. I tried combining all the flags (besides AGENT) with bitwise |, but it didn't seem to pick up all objects in range.—The preceding unsigned comment was added on 16:45, 22 September 2008 by Crystals Galicia

BloodyRain Rang: seems like LL screwed the sensors up cause 0 as type should find all things, even avatars but it doesnt work. And without that it seems impossible to detect any objects without going through all combinations of ACTIVE PASSIVE and SCRIPTED (7 combinations btw). Hope this get fixed someday. (2008-12-08)—The preceding unsigned comment was added on 18:02, 8 December 2008 by BloodyRain Rang

My apologies for not catching this sooner (or seeing these comments). The documentation was in error about zero being an acceptable value for type. The error stemmed from the documentation being based initially on the tooltips from the client script editor. Most such errors were caught during the initial import but not all. -- Strife (talk|contribs) 21:21, 8 December 2008 (UTC)

The return of NULL_KEY caveats are a little lacking

The sensor will not trigger if an invalid key (NULL_KEY) is "found" but if the structure of the script allows it the empty NULL_KEY can be returned. As with the simple following.<lsl>default {

   state_entry()
   {
       llSensorRepeat("", "", 3, 20.0, PI, 1.0);
   }
   sensor(integer detected)
   {
       llSay(0, (string)llDetectedName(0));
       llSay(0, (string)llDetectedName(1));
       llSay(0, (string)llDetectedName(2));
       llSay(0, (string)llDetectedName(3));
       llSay(0, (string)llDetectedName(4));
       llSay(0, (string)llDetectedName(5));
   }

}</lsl>I'm not saying this is good scripting but since it returns 5 null keys and 1 avatar (if it only finds one etc.) not being fully aware of the facts while compiling lists for eg. could get messy. Fact: If the event is not structured well to exclude NULL_KEYs they can be returned. -- Eddy (talk|contribs) 21:21, 8 August 2009 (UTC)

Agent's sit target no longer shows up?

This statement: "If the agent is sitting on an object, the root prim of the sat upon object becomes a second sensor target for the agent (but not if the avatar is outside the sensor arc, see SVC-5145[c])." no longer seems to be true - if you search for an agent, you only get the agent, and not the object it's sitting on. (No clue when this changed, I only tried it for the first time tonight). Redwood Rhiadra 01:22, 2 October 2010 (UTC)

Hi, this feature is definitely confusing, that is what CVS-5145 is, a request to make the behavior sensible and consistent. I will repeat the tests this weekend and see if it is broken in the same old way or if there are new ways too. --Cerise Sorbet 03:30, 2 October 2010 (UTC)