llGetObjectDetails

From Second Life Wiki
Revision as of 02:17, 30 August 2007 by Benja Kepler (talk | contribs) (added return type (list))
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Deletion Requested
The deletion of this article was requested for the following reason:

Template is no longer used and it's creator thinks it does not function properly.

If there is a need to discuss the deletion of this article, please add your comment(s) here.

Summary

Function: list llGetObjectDetails( key id, list params );

Gets the details specified in params for the object with key id.
Returns a list

• key id
• list params OBJECT_* flags

OBJECT_UNKNOWN_DETAIL is returned when passed an invalid integer parameter.
If id is not in the sim an empty list is returned.

Constant Description
OBJECT_NAME 1 Gets an object's name.
OBJECT_DESC 2 Gets an object's description. If id is an avatar, an empty string is returned.
OBJECT_POS 3 Gets an object's position.
OBJECT_ROT 4 Gets an object's rotation.
OBJECT_VELOCITY 5 Gets an object's velocity.
OBJECT_OWNER 6 Gets an object's owner's key. If id is group owned, a NULL_KEY is returned.
OBJECT_GROUP 7 Gets an prims's group's key. If id is an avatar, a NULL_KEY is returned.
OBJECT_CREATOR 8 Gets an object's creator's key. If id is an avatar, a NULL_KEY is returned.

Caveats

All Issues ~ Search JIRA for related Bugs

Examples

default
{
    collision_start(integer i)
    {
        list a = llGetObjectDetails(llDetectedKey(0), ([OBJECT_NAME, 
                    OBJECT_DESC, OBJECT_POS, OBJECT_ROT, OBJECT_VELOCITY,
                    OBJECT_OWNER, OBJECT_GROUP, OBJECT_CREATOR]));
        llSetText("UUID: " + (string)llDetectedKey(0) +
                "\nName: \"" + llList2String(a,0)+ "\"" +
                "\nDecription: \"" + llList2String(a,1) + "\"" +
                "\nPosition: " + llList2String(a,2) +
                "\nRotation: " + llList2String(a,3) +
                "\nVelocity: " + llList2String(a,4) +
                "\nOwner: " + llList2String(a,5) +
                "\nGroup: " + llList2String(a,6) +
                "\nCreator: " + llList2String(a,7),
                <1.0, 1.0, 1.0>, 1.0);
    }
}

Deep Notes

History

Introduced in version 1.18.3.2

Search JIRA for related Issues

Signature

function list llGetObjectDetails( key id, list params );