Syntax

string llKey2Name( key id );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

key id
avatar or prim UUID that is in the same region

id must specify a valid rezzed prim or avatar key, present in or otherwise known to the sim in which the script is running, otherwise an empty string is returned. In the case of an avatar, this function will still return a valid name if the avatar is a child agent of the sim (i.e., in an adjacent sim, but presently able to see into the one the script is in), or for a short period after the avatar leaves the sim (specifically, when the client completely disconnects from the sim, either as a main or child agent).

Keys of inventory items will not work; in the case of these, use llGetInventoryName instead.

Return value

Returns a string that is the legacy name of the prim or avatar specified by id.

Caveats

Examples

// Best viewed in Chat History (ctrl-h)

default
{
    collision_start(integer num_detected)
    {
        key id = llDetectedKey(0);
        string name = llKey2Name(id);

        string detectedName = llDetectedName(0);

        llSay(0, "llKey2Name: " + name
            + "\nllDetectedName: " + detectedName);
    }

    touch_start(integer num_detected)
    {
        key id = llDetectedKey(0);
        string name = llKey2Name(id);

        string detectedName = llDetectedName(0);

        llSay(0, "llKey2Name: " + name
            + "\nllDetectedName: " + detectedName);
    }
}

Notes

World Wide Web Consortium

Active Name2Key Databases:

Dead Name2Key Databases:

Name2Key Libraries:

See also

Functions

Articles

Deep notes

Issues

History

Footnotes

  1. Early release notes were not very accurate or thorough, they sometimes included information about features added in previous releases or failed to include information about features added in that release.