Unofficial LSL Reference

[[user:sei:llsensor_research]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

This table summarizes the various types of objects that every combination of flags for llSensor and llSensorRepeat is able to detect. Combinations of AGENT, ACTIVE and PASSIVE without SCRIPTED are straightforward. SCRIPTED can only be combined with PASSIVE.

The right column indicates the type that llDetectedType returns for the kind of detected object indicated in that row. It has nothing to do with the parameter passed to llSensor, even if the constants are common. Blame LL for the confusion this causes ;)

llSensor flag Types of objects that this flag can detect What
llDetectedType
returns
AGENT (1) • Agents not sitting on an object (i.e. either sitting on ground, or not sitting at all). AGENT|ACTIVE
• Agents sitting on an object (but not on ground). AGENT|PASSIVE
ACTIVE (2) • Unscripted physical objects that are moving. ACTIVE
• Physical objects with active scripts (*), or scripted physical objects that are moving. ACTIVE|SCRIPTED
• Non-physical objects with active scripts. (*) PASSIVE|SCRIPTED
AGENT|ACTIVE (3) Includes everything that AGENT and ACTIVE detect separately. See above.
PASSIVE (4) Detects only the objects that ACTIVE doesn't detect.
• Physical non-moving unscripted objects. ACTIVE
• Physical non-moving objects with an inactive script. (*) ACTIVE|SCRIPTED
• Non-physical unscripted objects. PASSIVE
• Non-physical objects with an inactive script. (*) PASSIVE|SCRIPTED
AGENT|PASSIVE (5) Includes everything that AGENT and PASSIVE detect separately. See above.
ACTIVE|PASSIVE (6) Includes every object (everything that PASSIVE and ACTIVE detect separately). See above.
AGENT|ACTIVE|PASSIVE (7) Includes every object and agent (everything that each flag detects separately). See above.
SCRIPTED (8) Like ACTIVE but excludes unscripted physical objects.
• Non-physical objects with an active script. (*) PASSIVE|SCRIPTED
• Physical objects with active scripts (*), or scripted physical objects that are moving. ACTIVE|SCRIPTED
AGENT|SCRIPTED (9)
ACTIVE|SCRIPTED (10)
AGENT|ACTIVE|SCRIPTED (11)
Same as SCRIPTED. The AGENT and ACTIVE flags have no effect when combined with SCRIPTED.
PASSIVE|SCRIPTED (12) • Non-physical scripted objects (with scripts active or not). PASSIVE|SCRIPTED
• Physical scripted objects (with scripts active or not). ACTIVE|SCRIPTED
AGENT|PASSIVE|SCRIPTED (13)
ACTIVE|PASSIVE|SCRIPTED (14)
AGENT|ACTIVE|PASSIVE|SCRIPTED (15)
Same as PASSIVE|SCRIPTED. The AGENT and ACTIVE flags have no effect when combined with SCRIPTED.
0 Function silently fails (no event is triggered)

(*) Active script: a script with an active llSetTimerEvent, llSensorRepeat, llListen (no matter if the listen is disabled by llListenControl), llTarget, llRotTarget and possibly more, or actively executing code at the time of scanning (e.g. in a tight loop, in llSleep, etc.)

Although not tested, presumably AGENT_BY_USERNAME works like AGENT with respect to the types of objects detected.