llBreakLink
void llBreakLink(integer LinkNumber)De-links the prim with the given link number (requires permission PERMISSION_CHANGE_LINKS be set).
Parameters
-
LinkNumber(integer)
//-- requests permission to change links, then breaks the link//-- between the prim and the rest of the object, on touch.default{ touch_start(integer vIntTouched) { llRequestPermissions(llGetOwner(), PERMISSION_CHANGE_LINKS); }
run_time_permissions(integer perm) { if (perm & PERMISSION_CHANGE_LINKS) { llBreakLink(llGetLinkNumber()); } }}Caveats
Section titled “Caveats”- This function removes sitting avatars from the object, even if not sitting on the unlinked prim.
- This function silently fails if called from a script inside an attachment.
- This function fails if the owner does not have edit permissions on the object containing the script. The owner receives the system message “Delink failed because you do not have edit permission”.
- A prim with
PERMISSION_CHANGE_LINKScan delink any prim in the linked object set, including itself or the root. - The only
LINK_*flag thatlinkcurrently supports isLINK_ROOT. See SVC-3510.- Use
llGetLinkNumber()as the parameter to unlink the script’s prim, notLINK_THIS. - Use
llBreakAllLinks()instead of usingLINK_SET,LINK_ALL_CHILDREN, orLINK_ALL_OTHERSas the parameter forllBreakLink.
- Use
See Also
Section titled “See Also”- llBreakAllLinks
- llCreateLink
changedevent withCHANGED_LINKflag