Difference between revisions of "LlGetAgentInfo"

From Second Life Wiki
Jump to navigation Jump to search
Line 13: Line 13:
{{!}}-{{Hl2}}
{{!}}-{{Hl2}}
! Constant
! Constant
! {{HoverText|Val|Value}}
! title="Value" {{!}} {{HoverText|Val|Value}}
!class="unsortable"{{!}} Returned if agent...
!class="unsortable"{{!}} Returned if agent...
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_ALWAYS_RUN}}
{{!}}{{LSL Const|AGENT_ALWAYS_RUN|integer|hex=0x1000|4096|c=has running ("Always Run") enabled}}
{{!}}{{LSL Hex|0x1000|4096}}
{{!}}{{#var:value}}
{{!}}has running ("Always Run") enabled
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_ATTACHMENTS}}
{{!}}{{LSL Const|AGENT_ATTACHMENTS|integer|hex=0x0002|2|c=has attachments}}
{{!}}{{LSL Hex|0x0002|2}}
{{!}}{{#var:value}}
{{!}}has attachments
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_AWAY}}
{{!}}{{LSL Const|AGENT_AWAY|integer|hex=0x0040|64|c=is in "away" mode}}
{{!}}{{LSL Hex|0x0040|64}}
{{!}}{{#var:value}}
{{!}}is in "away" mode
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_BUSY}}
{{!}}{{LSL Const|AGENT_BUSY|integer|hex=0x0800|2048|c=is in "busy" mode}}
{{!}}{{LSL Hex|0x0800|2048}}
{{!}}{{#var:value}}
{{!}}is in "busy" mode
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_CROUCHING}}
{{!}}{{LSL Const|AGENT_CROUCHING|integer|hex=0x0400|1024|c=is crouching}}
{{!}}{{LSL Hex|0x0400|1024}}
{{!}}{{#var:value}}
{{!}}is crouching
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_FLYING}}
{{!}}{{LSL Const|AGENT_FLYING|integer|hex=0x0001|1|c=is flying}}
{{!}}{{LSL Hex|0x0001|1}}
{{!}}{{#var:value}}
{{!}}is flying
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_IN_AIR}}
{{!}}{{LSL Const|AGENT_IN_AIR|integer|hex=0x0100|256|c=is in the air (hovering)}}
{{!}}{{LSL Hex|0x0100|256}}
{{!}}{{#var:value}}
{{!}}is in the air (hovering)
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_MOUSELOOK}}
{{!}}{{LSL Const|AGENT_MOUSELOOK|integer|hex=0x0008|8|c=is in mouselook}}
{{!}}{{LSL Hex|0x0008|8}}
{{!}}{{#var:value}}
{{!}}is in mouselook
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_ON_OBJECT}}
{{!}}{{LSL Const|AGENT_ON_OBJECT|integer|hex=0x0020|32|c=is sitting on an object}}
{{!}}{{LSL Hex|0x0020|32}}
{{!}}{{#var:value}}
{{!}}is sitting on an object
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_SCRIPTED}}
{{!}}{{LSL Const|AGENT_SCRIPTED|integer|hex=0x0004|4|c=has scripted attachments}}
{{!}}{{LSL Hex|0x0004|4}}
{{!}}{{#var:value}}
{{!}}has scripted attachments
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_SITTING}}
{{!}}{{LSL Const|AGENT_SITTING|integer|hex=0x0010|16|c=is sitting}}
{{!}}{{LSL Hex|0x0010|16}}
{{!}}{{#var:value}}
{{!}}is sitting
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_TYPING}}
{{!}}{{LSL Const|AGENT_TYPING|integer|hex=0x0200|512|c=is typing}}
{{!}}{{LSL Hex|0x0200|512}}
{{!}}{{#var:value}}
{{!}}is typing
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|AGENT_WALKING}}
{{!}}{{LSL Const|AGENT_WALKING|integer|hex=0x0080|128|c=is walking}}
{{!}}{{LSL Hex|0x0080|128}}
{{!}}{{#var:value}}
{{!}}is walking
{{!}}{{#var:comment}}
{{!}}}
{{!}}}
|examples=
|examples=

Revision as of 09:40, 28 October 2007

Summary

Function: integer llGetAgentInfo( key 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

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

Deep Notes

Signature

function integer llGetAgentInfo( key id );