AGENT BY LEGACY NAME
Jump to navigation
Jump to search
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer AGENT_BY_LEGACY_NAME = 0x1;The integer constant AGENT_BY_LEGACY_NAME has the value 0x1
If it is contained in the result of llDetectedType, it means it is avatar.
If it is used as an filter of llSensor or llSensorRepeat, it will search for avatars by legacy name.
Caveats
There is no avatar whose llDetectedType is equal to 1(AGENT_BY_LEGACY_NAME)
since there is no avatar who doesn't require the physical calculation, even if they are just standing. Standing agent's type will be equal to 3(AGENT_BY_LEGACY_NAME|ACTIVE)
. Sitting agent's type will be equal to 5(AGENT_BY_LEGACY_NAME|PASSIVE)
.
Related Articles
Constants
|
Functions
• | llDetectedType | |||
• | llSensor | |||
• | llSensorRepeat |
Examples
Using llDetectedType in collision event: <source lang="lsl2"> integer type;
default {
state_entry() { llVolumeDetect(TRUE); } collision_start(integer detected) { type = llDetectedType(0); if (type == AGENT)// = 1 { llSay(0, "This is impossible. Since there is no avatar who doesn't require the physical calculation."); } else if (type == ACTIVE)// = 2 { llSay(0, "I have been struck by a physical object not containing any script."); } else if (type == PASSIVE)// = 4 { llSay(0, "This is impossible. Non-physical objects cannot trigger this event."); } else if (type == SCRIPTED)// = 8 { llSay(0, "This is impossible. Since there is no object which isn't physical nor non-physical."); } else if (type == (AGENT