AGENT FLYING
Looking for the current API? Open the AGENT_FLYING reference →
Wiki description
Used with llGetAgentInfo to determine if the queried avatar is flying.
Examples
Count how many people are currently flying within this parcel
// On touch, say how many avatars are currently flying within this parcel
default
{
touch_start(integer total_number)
{
list AgentList = llGetAgentList(AGENT_LIST_PARCEL, [] );
integer CountAll = (AgentList != [] );
integer CountFlying;
key AgentKey;
while (CountAll)
{
AgentKey = llList2Key(AgentList, --CountAll);
if (llGetAgentInfo(AgentKey) & AGENT_FLYING) ++CountFlying;
}
llSay(0, (string) CountFlying + " avatars are currently flying within this parcel" );
}
}See also: constants
| Constant | Val | Returned if agent... |
|---|---|---|
| 4096 | 0x1000 | has running ("Always Run") enabled, or is using tap-tap-hold |
| 2 | 0x0002 | has attachments |
| 16384 | 0x4000 | is marked as a scripted agent/bot |
| 8192 | 0x2000 | is in "autopilot" mode |
| 64 | 0x0040 | is in "away" mode |
| 2048 | 0x0800 | is in "busy" mode |
| 1024 | 0x0400 | is crouching |
| 32768 | 0x8000 | is floating or hovering because of a scripted attachment |
| 1 | 0x0001 | is flying or hovering |
| 256 | 0x0100 | is in the air (jumping, flying or falling) |
| 8 | 0x0008 | is in mouselook |
| 32 | 0x0020 | is sitting on an object (and linked to it) |
| 4 | 0x0004 | has scripted attachments |
| 16 | 0x0010 | is sitting"Sit down" on the avatar context menu allows ground sits anywhere: atop the terrain, on objects or even in the air, so it is possible to sit "on" an object without linking. |
| 512 | 0x0200 | is typing |
| 128 | 0x0080 | is walking, running or crouch walking |
See also: functions
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.