Category:LSL Link/ja

From Second Life Wiki
Jump to navigation Jump to search

部分的な利用

<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();
   rotation rot = llGetRootRotation();
   return (llList2Vector(llGetObjectDetails(llGetLinkKey(link), (list)OBJECT_POS) + pos, 0) - pos) / rot;

}

rotation GetLinkLocalRot(integer link) {

   rotation rot = llGetRootRotation();
   return llList2Rot(llGetObjectDetails(llGetLinkKey(link), (list)OBJECT_ROT) + rot, 0) / rot;

}</lsl>