llBreakLink
function
Function syntax
llBreakLink(integer link// The link number (0: unlinked, 1: root prim, >1: child prims and seated avatars) to delink. Values: Links
);- Energy
- 10
- Permission
PERMISSION_CHANGE_LINKS
Delinks the prim specified by the link number link. Requires the PERMISSION_CHANGE_LINKS runtime permission.
Delinks the prim with the given link number in a linked object set
llBreakLink(0);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 the link number refers to a seated avatar. Use
llUnSitinstead - 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 system message “Delink failed because you do not have edit permission” is received by the owner.
- A prim with
PERMISSION_CHANGE_LINKScan delink any prim in the linked object set even itself or the root - The only LINK_* flag that link currently supports is
LINK_ROOT. 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.
Examples
Section titled “Examples”Example 1
11 collapsed lines
//-- 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()); } }}Known issues
Section titled “Known issues”From the issue templates included by the wiki article:
- SVC-3510 (bug): LINK_* flags do not work with llBreakLink
See also
Section titled “See also”Functions
Section titled “Functions”llBreakAllLinks— Break all linksllCreateLink— Link to another object
Events
Section titled “Events”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.