LlBreakLink

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Buggy
Function: llBreakLink( integer linknum );
142 Function ID
0.0 Delay
10.0 Energy

Delinks the prim with the given link number in a linked object set

• integer linknum Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag

Requires the PERMISSION_CHANGE_LINKS permission, granted by the owner, to run.

Caveats

  • Do not depend upon the auto-grant status of permissions. Always use the run_time_permissions event.
  • If the script lacks the permission PERMISSION_CHANGE_LINKS, the script will shout an error on DEBUG_CHANNEL and the operation fails (but the script continues to run).
  • If PERMISSION_CHANGE_LINKS is granted by anyone other than the owner, then when the function is called an error will be shouted on DEBUG_CHANNEL.
  • Once the PERMISSION_CHANGE_LINKS permission is granted there is no way to revoke it except from inside the script (for example, with a new llRequestPermissions call). Otherwise, the script will only lose the permission if it is reset or the object is derezzed (deleted, detached, or taken).
  • 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 system message "Delink failed because you do not have edit permission" is received by the owner.
  • A prim with PERMISSION_CHANGE_LINKS can delink any prim in the linked object set even itself or the root
  • The only LINK_* flag that linknum currently supports is LINK_ROOT. SVC-3510

Important Issues

~ Search JIRA for related Bugs
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.    LINK_* flags do not work with llBreakLink

Examples

//-- requests permission to change links, then breaks the link
//-- between the prim and the rest of the object, on touch.
default{
  state_entry(){
    llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );
  }
 
  touch_start( integer vIntTouched ){
    llBreakLink( llGetLinkNumber() );
  }
}

See Also

Events

•  run_time_permissions Permission receiving event
•  changed CHANGED_LINK

Functions

•  llGetLinkNumber Returns the link number of the prim the script is in.
•  llGetPermissions Get the permissions granted
•  llGetPermissionsKey Get the agent who granted permissions
•  llRequestPermissions Request permissions
•  llBreakAllLinks Break all links
•  llCreateLink Link to another object

Articles

•  Script permissions

Deep Notes

Issues

~ Search JIRA for related 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.    LINK_* flags do not work with llBreakLink
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
In other languages