Difference between revisions of "Category:LSL Link/Get"

From Second Life Wiki
Jump to navigation Jump to search
m (Comments were for previous version that did not use PRIM_*_LOCAL flags.)
m (Replaced <lsl> with <syntaxhighlight>)
 
Line 1: Line 1:
{{LSL Header|ml=*}}{{LSLC|Link}}{{LSLC|}}
{{LSL Header|ml=*}}{{LSLC|Link}}{{LSLC|}}
{{Box|Useful Snippets|2=
{{Box|Useful Snippets|2=
<lsl>list GetLinkDetails(integer link, list OBJECT_FLAGS)
<syntaxhighlight lang="lsl2">list GetLinkDetails(integer link, list OBJECT_FLAGS)
{//simple wrapper
{//simple wrapper
     return llGetObjectDetails(llGetLinkKey(link), OBJECT_FLAGS);
     return llGetObjectDetails(llGetLinkKey(link), OBJECT_FLAGS);
Line 29: Line 29:
{
{
     return llList2Rot(llGetLinkPrimitiveParams(link, (list)PRIM_ROT_LOCAL), 0);
     return llList2Rot(llGetLinkPrimitiveParams(link, (list)PRIM_ROT_LOCAL), 0);
}</lsl>
}</syntaxhighlight>
}}
}}

Latest revision as of 10:01, 13 September 2022

Useful Snippets

list GetLinkDetails(integer link, list OBJECT_FLAGS)
{//simple wrapper
    return llGetObjectDetails(llGetLinkKey(link), OBJECT_FLAGS);
}

key GetLinkCreator(integer link)
{
    return llList2Key(llGetObjectDetails(llGetLinkKey(link), (list)OBJECT_CREATOR) + NULL_KEY, 0);
}

key GetLinkGroup(integer link)
{
    return llList2Key(llGetObjectDetails(llGetLinkKey(link), (list)OBJECT_GROUP) + NULL_KEY, 0);
}

string GetLinkDesc(integer link)
{
    return (string)llGetObjectDetails(llGetLinkKey(link), (list)OBJECT_DESC);
}

vector GetLinkLocalPos(integer link)
{
    return llList2Vector(llGetLinkPrimitiveParams(link, (list)PRIM_POS_LOCAL), 0);
}
 
rotation GetLinkLocalRot(integer link)
{
    return llList2Rot(llGetLinkPrimitiveParams(link, (list)PRIM_ROT_LOCAL), 0);
}

Pages in category "LSL Link/Get"

The following 5 pages are in this category, out of 5 total.