Don't click here unless you want to be banned.

LSL Wiki : llBreakLink

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl423.us.archive.org
llBreakLink(integer linknum)

Delinks the object with the given link number linknum (requires the permission PERMISSION_CHANGE_LINKS be set).

Remaining link children in the link set will be renumbered, so if llBreakLink(5) will cause the previous child prim 6 to become 5, child 7 will become 6, and so on.

If you want the prim that was delinked to do something after delinking, use a changed event, as in this example:
changed(integer change) {
    if (change & CHANGED_LINK) // linked/unlinked/sat on
        if (llGetLinkNumber() == 0) // now i'm a single prim linked to nothing
            llDie(); // so i die
}

Q: Can I delink a prim from an attachment?
A: No. If you want to make a prim in an attachment invisible, you can use llSetAlpha to hide it, but it will remain linked to the rest of the attachment.

Q: Do I need to call llBreakLink from the root prim in order for this to work?
A: No, as long as it has PERMISSION_CHANGE_LINKS set, any script in any prim may break the link. You cannot grant permissions to one script and have another act upon those permissions, however. Scripts must request their own permissions.
Q: However, the page for PERMISSION_CHANGE_LINKS states that this permission "must be requested by a script in the object's parent/root prim". Doesn't that make the above answer "Yes, because only the root prim can get the required permission"?

Q: Can I delink a prim from a no mod object?
A: Yes.
A: I'm uncertain when this functionality changed but my testing shows that if you attempt to break a link from a no-mod object, it will fail with the error message "Delink failed because you do not have edit permission".

Q: Can I use this function to force an avatar to get off the prim?
A: No. Use llUnSit instead.

To break all links in a linked object, use llBreakAllLinks.


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Constants | Link
Comments [Hide comments/form]
Apparently group-owned objects can't break links =(
-- c-69-254-233-71.hsd1.ks.comcast.net (2007-10-24 23:02:53)
Attach a comment to this page: