Difference between revisions of "Category:LSL Link/Get"
Jump to navigation
Jump to search
m (New page: {{multi-lang}}{{LSL Header}}{{LSLC|Link}}{{LSLC|}}) |
m |
||
Line 1: | Line 1: | ||
{{multi-lang}}{{LSL Header}}{{LSLC|Link}}{{LSLC|}} | {{multi-lang}}{{LSL Header}}{{LSLC|Link}}{{LSLC|}} | ||
{{Box|Useful Snippets|2= | |||
<lsl>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) | |||
{ | |||
vector pos = llGetRootPosition(); | |||
key k = llGetLinkKey(link); | |||
if(llGetLinkKey(!!llGetLinkNumber()) != k) | |||
return (llList2Vector(llGetObjectDetails(k, (list)OBJECT_POS) + pos, 0) - pos) / llGetRootRotation(); | |||
return pos; | |||
} | |||
rotation GetLinkLocalRot(integer link) | |||
{ | |||
rotation rot = llGetRootRotation(); | |||
key k = llGetLinkKey(link); | |||
if(llGetLinkKey(!!llGetLinkNumber()) != k) | |||
return llList2Rot(llGetObjectDetails(k, (list)OBJECT_ROT) + rot, 0) / rot; | |||
return rot; | |||
}</lsl> | |||
}} |
Revision as of 06:42, 23 October 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Useful Snippets
<lsl>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) {
vector pos = llGetRootPosition(); key k = llGetLinkKey(link); if(llGetLinkKey(!!llGetLinkNumber()) != k) return (llList2Vector(llGetObjectDetails(k, (list)OBJECT_POS) + pos, 0) - pos) / llGetRootRotation(); return pos;
}
rotation GetLinkLocalRot(integer link) {
rotation rot = llGetRootRotation(); key k = llGetLinkKey(link); if(llGetLinkKey(!!llGetLinkNumber()) != k) return llList2Rot(llGetObjectDetails(k, (list)OBJECT_ROT) + rot, 0) / rot; return rot;
}</lsl>
Pages in category "LSL Link/Get"
The following 5 pages are in this category, out of 5 total.