Difference between revisions of "LlGetAgentInfo"
Jump to navigation
Jump to search
m (Fix for alphabetical order in Functions list) |
(not doing every flag, it's overkill.) |
||
Line 3: | Line 3: | ||
|sort=GetAgentInfo | |sort=GetAgentInfo | ||
|func_id=206|func_sleep=0.0|func_energy=10.0 | |func_id=206|func_sleep=0.0|func_energy=10.0 | ||
|return_type=integer|p1_type=key|p1_name=id|p1_desc=agent [[UUID]] in [[ | |return_type=integer|p1_type=key|p1_name=id|p1_desc=agent [[UUID]] in [[region]] | ||
|func_footnote | |func_footnote | ||
|func_desc | |func_desc | ||
Line 76: | Line 76: | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
|examples | |examples= | ||
<pre> | |||
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."; | |||
} | |||
} | |||
</pre> | |||
|helpers | |helpers | ||
|also_functions={{LSL DefineRow||[[llRequestAgentData]]|}} | |also_functions={{LSL DefineRow||[[llRequestAgentData]]|}} |
Revision as of 02:52, 9 May 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 |
|
|
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."; } }
See Also
Functions
• | llRequestAgentData |