Difference between revisions of "Category:LSL Link/Get"
Jump to navigation
Jump to search
m (should work) |
m |
||
Line 23: | Line 23: | ||
vector GetLinkLocalPos(integer link) | vector GetLinkLocalPos(integer link) | ||
{//This function may not produce a perfect result, expect there to be some drift. This will not work in attachments. | {//This function may not produce a perfect result, expect there to be some drift. This will not work in attachments. | ||
return llList2Vector(llGetLinkPrimitiveParams(link, (list)PRIM_POS_LOCAL), 0); | |||
} | } | ||
rotation GetLinkLocalRot(integer link) | rotation GetLinkLocalRot(integer link) | ||
{//This function may not produce a perfect result, expect there to be some drift. This will not work in attachments. | {//This function may not produce a perfect result, expect there to be some drift. This will not work in attachments. | ||
return llList2Rot(llGetLinkPrimitiveParams(link, (list)PRIM_ROT_LOCAL), 0); | |||
}</lsl> | }</lsl> | ||
}} | }} |
Revision as of 21:35, 3 August 2011
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Useful Snippets
<lsl>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) {//This function may not produce a perfect result, expect there to be some drift. This will not work in attachments.
return llList2Vector(llGetLinkPrimitiveParams(link, (list)PRIM_POS_LOCAL), 0);
}
rotation GetLinkLocalRot(integer link) {//This function may not produce a perfect result, expect there to be some drift. This will not work in attachments.
return llList2Rot(llGetLinkPrimitiveParams(link, (list)PRIM_ROT_LOCAL), 0);
}</lsl>
Pages in category "LSL Link/Get"
The following 5 pages are in this category, out of 5 total.