Difference between revisions of "LlGetObjectDetails"

From Second Life Wiki
Jump to navigation Jump to search
Line 6: Line 6:
|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'''.
|func_desc=Gets 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.
|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.
|caveats=*Items in '''param''' that are not integers are silently ignored, {{LSL Const|OBJECT_UNKNOWN_DETAIL|integer|-1|c=}} is not returned.
|caveats=*Items in '''param''' that are not integers are silently ignored, {{LSL Const|OBJECT_UNKNOWN_DETAIL|integer|-1|c=}} is not returned.

Revision as of 20:12, 29 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: llGetObjectDetails( key id, list params );

Gets 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

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("Name: " + 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 void llGetObjectDetails( key id, list params );