Difference between revisions of "LlBreakAllLinks"

From Second Life Wiki
Jump to navigation Jump to search
(I am at a loss for words. If you know it doesn't work and you know why, fix it.)
m (Added example)
Line 9: Line 9:
|caveats
|caveats
|constants
|constants
|examples
|examples=
<lsl>
//-- 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();
  }
}
</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llBreakLink]]|Break a link}}
|also_functions={{LSL DefineRow||[[llBreakLink]]|Break a link}}

Revision as of 05:32, 11 February 2008

Summary

Function: llBreakAllLinks( );
0.0 Forced Delay
10.0 Energy

Delinks all prims in the link set.

To run this function the script must request the PERMISSION_CHANGE_LINKS permission with llRequestPermissions and it must be granted by the owner.

Caveats

Permissions

Examples

<lsl> //-- 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();
 }

}

</lsl>

See Also

Events

•  run_time_permissions Permission receiving event

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

Signature

function void llBreakAllLinks();