Jump to content

LlGetAttached

From OSgrid Wiki
Revision as of 22:06, 31 December 2017 by Osgridadmin (talk | contribs) (Created page with "==Function: integer llGetAttached( );== Returns an integer that is the attachment point the object is attached to or zero if not attached.<br><br> {| class="wikitable" border=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function: integer llGetAttached( );

Returns an integer that is the attachment point the object is attached to or zero if not attached.

Constant Comment
ATTACH_CHEST 1 chest/sternum
ATTACH_HEAD 2 head
ATTACH_LSHOULDER 3 left shoulder
ATTACH_RSHOULDER 4 right shoulder
ATTACH_LHAND 5 left hand
ATTACH_RHAND 6 right hand
ATTACH_LFOOT 7 left foot
ATTACH_RFOOT 8 right foot
ATTACH_BACK 9 back
ATTACH_PELVIS 10 pelvis
ATTACH_MOUTH 11 mouth
ATTACH_CHIN 12 chin
ATTACH_LEAR 13 left ear
ATTACH_REAR 14 right ear
ATTACH_LEYE 15 left eye
ATTACH_REYE 16 right eye
ATTACH_NOSE 17 nose
ATTACH_RUARM 18 right upper arm
ATTACH_RLARM 19 right lower arm
ATTACH_LUARM 20 left upper arm
ATTACH_LLARM 21 left lower arm
ATTACH_RHIP 22 right hip
ATTACH_RULEG 23 right upper leg
ATTACH_RLLEG 24 right lower leg
ATTACH_LHIP 25 left hip
ATTACH_LULEG 26 left upper leg
ATTACH_LLLEG 27 left lower leg
ATTACH_BELLY 28 belly/stomach/tummy
ATTACH_RPEC 29 left pectoral
ATTACH_LPEC 30 right pectoral
ATTACH_HUD_CENTER_2 31 HUD Center 2
ATTACH_HUD_TOP_RIGHT 32 HUD Top Right
ATTACH_HUD_TOP_CENTER 33 HUD Top
ATTACH_HUD_TOP_LEFT 34 HUD Top Left
ATTACH_HUD_CENTER_1 35 HUD Center
ATTACH_HUD_BOTTOM_LEFT 36 HUD Bottom Left
ATTACH_HUD_BOTTOM 37 HUD Bottom
ATTACH_HUD_BOTTOM_RIGHT 38 HUD Bottom Right


Examples

<source lang="lsl">

default {

   attach(key id)
   {
       if(id)//it's attached
       {
           if(llGetAttached() != ATTACH_LHAND)
           {
               llOwnerSay("Please attach me only to the left hand");
               llRequestPermissions(id, PERMISSION_ATTACH);
           }
       }
   }
   run_time_permissions(integer a)
   {
       if(a & PERMISSION_ATTACH)
           llDetachFromAvatar();
   }

} </source>


See Also
Events
• attach
Functions
• llAttachToAvatar
• llDetachFromAvatar
Deep Notes
Issues
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it. SVC-580[c] The values for ATTACH_RPEC and ATTACH_LPEC are reversed (compiler bug).