Difference between revisions of "LlGetAgentInfo"
Jump to navigation
Jump to search
(not doing every flag, it's overkill.) |
|||
Line 9: | Line 9: | ||
|spec | |spec | ||
|caveats | |caveats | ||
|constants={{{!}} | |constants= | ||
{{{!}}class="wikitable sortable collapsible" {{Prettytable}} | |||
{{!}}-{{Hl2}} | {{!}}-{{Hl2}} | ||
! | ! Constant | ||
! {{HoverText|Val|Value}} | |||
!class="unsortable"{{!}} Returned if agent... | |||
{{!}}- | {{!}}- | ||
{{!}}{{LSLG|AGENT_ALWAYS_RUN}} | {{!}}{{LSLG|AGENT_ALWAYS_RUN}} | ||
Line 44: | Line 43: | ||
{{!}}{{LSL Hex|0x0100|256}} | {{!}}{{LSL Hex|0x0100|256}} | ||
{{!}}is in the air (hovering) | {{!}}is in the air (hovering) | ||
{{!}}- | {{!}}- | ||
{{!}}{{LSLG|AGENT_MOUSELOOK}} | {{!}}{{LSLG|AGENT_MOUSELOOK}} | ||
Line 74: | Line 67: | ||
{{!}}{{LSL Hex|0x0080|128}} | {{!}}{{LSL Hex|0x0080|128}} | ||
{{!}}is walking | {{!}}is walking | ||
{{!}}} | {{!}}} | ||
|examples= | |examples= |
Revision as of 16:49, 14 July 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llGetAgentInfo( key id );206 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns an integer bitfield containing the agent information about id.
• key | id | – | agent UUID in region |
Constant | Val | Returned if agent... |
---|---|---|
AGENT_ALWAYS_RUN | 0x1000 | has running ("Always Run") enabled |
AGENT_ATTACHMENTS | 0x0002 | has attachments |
AGENT_AWAY | 0x0040 | is in "away" mode |
AGENT_BUSY | 0x0800 | is in "busy" mode |
AGENT_CROUCHING | 0x0400 | is crouching |
AGENT_FLYING | 0x0001 | is flying |
AGENT_IN_AIR | 0x0100 | is in the air (hovering) |
AGENT_MOUSELOOK | 0x0008 | is in mouselook |
AGENT_ON_OBJECT | 0x0020 | is sitting on an object |
AGENT_SCRIPTED | 0x0004 | has scripted attachments |
AGENT_SITTING | 0x0010 | is sitting |
AGENT_TYPING | 0x0200 | is typing |
AGENT_WALKING | 0x0080 | is walking |
Caveats
Examples
default { touch_start(integer buf) { buf = llGetAgentInfo(llDetectedKey(0)); string out; if(buf & AGENT_FLYING) out += "The agent is flying.\n"; else out += "The agent is not flying.\n"; if(buf & AGENT_ATTACHMENTS) { if(buf & AGENT_SCRIPTED) out += "The agent has scripted attachments.\n"; else out += "The agent's attachments are unscripted.\n"; } else out += "The agent does not have attachments.\n"; if(buf & AGENT_MOUSELOOK) out += "the agent is in mouselook."; else out += "the agent is in normal camera mode."; llWhisper(0, out); } }
See Also
Functions
• | llRequestAgentData |