Difference between revisions of "LlGetAttached"
Jump to navigation
Jump to search
Gigs Taggart (talk | contribs) m (LSL llGetAttached moved to LlGetAttached) |
|||
Line 8: | Line 8: | ||
|caveats | |caveats | ||
|constants={{LSL_Constants_Attachment}} | |constants={{LSL_Constants_Attachment}} | ||
|examples | |examples= | ||
<pre> | |||
default | |||
{ | |||
attach(key id) | |||
{ | |||
if(id)//it's attached | |||
{ | |||
if(llGetAttached() != ATTACH_LHAND) | |||
{ | |||
llOwnerSay("Please attach me only to the left hand"); | |||
llReqeustPermissions(id, PERMISSION_ATTACH); | |||
} | |||
} | |||
} | |||
runtime_permissions(integer a) | |||
{ | |||
if(a & PERMISSION_ATTACH) | |||
llDetachFromAvatar(); | |||
} | |||
} | |||
</pre> | |||
|helpers | |helpers | ||
|also_functions= | |also_functions={{LSL DefineRow||[[llAttachToAvatar]]}} | ||
{{LSL DefineRow||[[llDetachFromAvatar]]}} | |||
|also_events= | |also_events={{LSL DefineRow||[[attach]]}} | ||
|also_tests | |also_tests | ||
|also_articles | |also_articles |
Revision as of 13:21, 8 August 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llGetAttached( );224 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns an integer that is the object attachment point or zero if not attached.
Note: Constants in italic require a viewer compatible with the Project Bento skeleton. |
|
|
Caveats
Examples
default { attach(key id) { if(id)//it's attached { if(llGetAttached() != ATTACH_LHAND) { llOwnerSay("Please attach me only to the left hand"); llReqeustPermissions(id, PERMISSION_ATTACH); } } } runtime_permissions(integer a) { if(a & PERMISSION_ATTACH) llDetachFromAvatar(); } }