LlBreakAllLinks

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

Function: llBreakAllLinks( );
143 Function ID
0.0 Delay
10.0 Energy

Delinks all prims in the link set.

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 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.

Search JIRA for related Bugs

Examples

 
//-- requests permission to change linkes, then breaks all links on touch.
default{
  state_entry(){
    llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );
  }
 
  run_time_permissions( integer vBitPermissions ){
    if (PERMISSION_CHANGE_LINKS & vBitPermissions){
      state sMain;
    }else{
      llResetScript();
    }
  }
}
 
state sMain{
  touch_start( integer vIntTouched ){
    llBreakAllLinks();
  }
}
 

See Also

Events

•  run_time_permissions Permission receiving event
•  changed CHANGED_LINK

Functions

•  llGetPermissions Get the permissions granted
•  llGetPermissionsKey Get the agent who granted permissions
•  llRequestPermissions Request permissions
•  llBreakLink Break a link
•  llCreateLink Link to another object

Articles

•  Script permissions

Deep Notes

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