AGENT_WALKING
integer AGENT_WALKING = 0x80;Used with llGetAgentInfo to determine if the queried avatar is walking, running, or crouch walking.
Constant groups
Other AgentInfo values (15)
AGENT_ALWAYS_RUN0x1000AGENT_ATTACHMENTS0x2AGENT_AUTOMATED0x4000AGENT_AUTOPILOT0x2000AGENT_AWAY0x40AGENT_BUSY0x800AGENT_CROUCHING0x400AGENT_FLOATING_VIA_SCRIPTED_ATTACHMENT0x8000AGENT_FLYING0x1AGENT_IN_AIR0x100AGENT_MOUSELOOK0x8AGENT_ON_OBJECT0x20AGENT_SCRIPTED0x4AGENT_SITTING0x10AGENT_TYPING0x200
Used with llGetAgentInfo to determine if the queried avatar is walking.
Examples
Section titled “Examples”Cause a sound to be played while the wearer of the hud or attachment is walking.
Place this script in a Hud for the owner only to hear the sound,
or in an attachment for others to hear your footsteps too.
You’ll need a sound file in the object too, with your choice of footstep sounds.
10 collapsed lines
// Play a sound whenever the owner is walkinginteger gWasWalking; // TRUE when wearer is already walkingstring gSound = "footsteps"; // name of soundfile in inventorydefault{ state_entry() { // Start a timer to continuously check if the owner is walking llSetTimerEvent(0.25); } timer() { integer NowWalking = llGetAgentInfo(llGetOwner()) & AGENT_WALKING; if (NowWalking != gWasWalking) // walking has stopped or started {6 collapsed lines
llStopSound(); if (NowWalking) llLoopSound(gSound, 1.0); } gWasWalking = NowWalking; }}See also
Section titled “See also”Constants
Section titled “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 sitting1 |
| 512 | 0x0200 | is typing |
| 128 | 0x0080 | is walking, running or crouch walking |
Functions
Section titled “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.
Footnotes
Section titled “Footnotes”-
“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. ↩