AGENT: Difference between revisions
Jump to navigation
Jump to search
Mako Nozaki (talk | contribs) No edit summary |
Mako Nozaki (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
|type=integer | |type=integer | ||
|value={{LSL Hex|0x1}} | |value={{LSL Hex|0x1}} | ||
|desc= | |desc=If it is contained in the result of llDetectedType(), it means it is avatar.<br />If it is used as an filter of llSensor() or llSensorRepeat(), it will search for avatars. | ||
|constants={{LSL Constants Sensor|no_wrapper=true}} | |constants={{LSL Constants Sensor|no_wrapper=true|examples=*}} | ||
|caveats=There is no avatar whose llDetectedType() is ''equal to'' 1([[AGENT]]) since there is no avatar who doesn't require the physical calculation, even if they are just standing. Agent's type will be equal to 3([[AGENT]]<nowiki>|</nowiki>[[ACTIVE]]). You will always need to use this flag as an mask. | |caveats=There is no avatar whose llDetectedType() is ''equal to'' 1([[AGENT]]) since there is no avatar who doesn't require the physical calculation, even if they are just standing. Agent's type will be equal to 3([[AGENT]]<nowiki>|</nowiki>[[ACTIVE]]). You will always need to use this flag as an mask. | ||
|functions= | |functions= | ||
{{LSL DefineRow||[[llDetectedType]]|}} | {{LSL DefineRow||[[llDetectedType]]|}} |
Revision as of 03:29, 22 May 2010
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer AGENT = 0x1;The integer constant AGENT 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.
Caveats
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