Syntax

vector llGetAgentSize( key avatar );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

key avatar
avatar UUID that is in the same region

ZERO_VECTOR is returned if avatar is not in the region or if it is not an avatar.

Return value

Returns a vector that is an estimated size of the requested avatar.

Caveats

Examples

//A simple script that makes a box hover above the owner's head.
default
{
    state_entry()
    {
        key    owner = llGetOwner();
        vector pos   = llList2Vector(llGetObjectDetails(owner, [OBJECT_POS]), 0);
        vector agent = llGetAgentSize(owner);

    //  "pos" needs to be adjusted so it appears above the owner.
        pos.z += 0.5 + agent.z / 2;

    //  makes sure it found the owner, a zero vector evaluates as false
        if(agent)
            llSetPos(pos);
    }

    touch_start(integer num)
    {
        llResetScript();
    }
}

Notes

To use this function to test either case use as follows

if(llGetAgentSize(uuid)) {
    //uuid is an avatar in the region
} else {
    //uuid is not an avatar in the region
}
vector agentSize = llGetAgentSize(uuid);
if (agentSize.z == 1.9) {
    // avatar is probably Ruthed
}

See also

Functions

Articles

Footnotes

  1. indra/llcommon/indra_constants.h:88
  2. indra/llcommon/indra_constants.h:92
  3. llGetAgentSize returns the same value as indra/llappearance/llavatarappearance.cpp:433. See indra/llcommon/indra_constants.h:86 for defaults and limits.