Don't click here unless you want to be banned.

LSL Wiki : Detected

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org

Detection


Detection functions (llDetected*) determine information about objects and agents detected by sensors, touch, and collision events.

All detection functions have one integer parameter in common, which is an index (ranging from 0 to total_number - 1) of the found targets of a sensor, touch, or collision event. Negative index values do not work, nor do ones that are equal to or greater than the number of entries taken from the event paramater. If an event does not specify this value it is zero. When an index falls outside the valid range, default values are returned.

If a detection function is called from a user-defined function, the function inherits the data from the event that called it.

Detection Functions

llDetectedGrab
llDetectedGroup
llDetectedKey
llDetectedLinkNumber
llDetectedName
llDetectedOwner
llDetectedPos
llDetectedRot
llDetectedType
llDetectedVel

Modifying Functions

llCollisionFilter
llVolumeDetect
llPassCollisions
llPassTouches


Detection Events

collision_start
collision
collision_end
sensor
touch_start
touch
touch_end

Q: It's not working. I'm not getting anything returned.
A: Are you putting your llDetected* function in an event handler other than the collision, collision_start, collision_end, sensor, touch, touch_start, or touch_end events? The llDetected* functions won't return a meaningful value in any other event.

Q: Do the detection functions make calls to either the asset or data server?
A: No. As clarified by Kelly Linden here, all the possible data that could be returned by the detection functions is stored during the sensor call.

Q: I'm not getting anything returned when the object is phantom. Is there a workaround for that?
A: Use llVolumeDetect, just be sure to let the function turn it phantom.


Functions | Events | Sensors | Touch | Collisions
Comments [Hide comments/form]
Other info you can get about an object from its key:

llGetAgentInfo
llGetAgentSize
llGetBoundingBox
llGetObjectMass
llGetOwnerKey (though can use llDetectedOwner here)

Anything else?
-- SeifertSurface (2006-10-21 13:36:32)
when talking about the integer parameter for the detection functions, what is the total_number? for example, for the touch_start event, does the "total number" mean the number of all the agents who have ever touched the object? or the number of the agents who touch the object simultaneously?
-- pc-li-s.cas.mcmaster.ca (2007-06-13 06:33:28)
Attach a comment to this page: