Difference between revisions of "LlGetObjectDetails"

From Second Life Wiki
Jump to navigation Jump to search
(added return type (list))
m (knew i had forgotten to do something ^^;)
Line 3: Line 3:
|func_id=332|func_sleep=0.0|func_energy=10.0
|func_id=332|func_sleep=0.0|func_energy=10.0
|func=llGetObjectDetails
|func=llGetObjectDetails
|return_type=list|p1_type=key|p1_name=id
|p1_type=key|p1_name=id
|p2_type=list|p2_name=params|p2_desc=OBJECT_* flags
|p2_type=list|p2_name=params|p2_desc=OBJECT_* flags
|func_desc=Gets the details specified in '''params''' for the object with key '''id'''.
|return_type=list|return_text=of the details specified in '''params''' for the object with key '''id'''.
|func_footnote={{LSL Const|OBJECT_UNKNOWN_DETAIL|integer|-1|c=}} is returned when passed an invalid integer parameter.<br/>
|func_footnote={{LSL Const|OBJECT_UNKNOWN_DETAIL|integer|-1|c=}} is returned when passed an invalid integer parameter.<br/>
If '''id''' is not in the sim an empty list is returned.
If '''id''' is not in the sim an empty list is returned.

Revision as of 07:29, 30 August 2007

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 );
0.0 Forced Delay
10.0 Energy

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

• 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

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

Signature

function list llGetObjectDetails( key id, list params );