LlBreakAllLinks
首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
函数名 |
---|
Function: llBreakAllLinks( ); |
参数:无 |
返回值:Delinks all prims in the link set. |
注意事项 |
---|
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.
To run this function the script must request the PERMISSION_CHANGE_LINKS permission with llRequestPermissions and it must be granted by the owner. Permissions 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) or the script is reset or deleted. |
示例 |
---|
//-- 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(); } } |
相关函数 |
---|
llGetPermissions – Get the permissions granted
llGetPermissionsKey - Get the agent who granted permissions llRequestPermissions – Request permissions llBreakLink – Break a link llCreateLink – Link to another object |
相关事件 |
---|
run_time_permissions – Permission receiving event
changed – CHANGED_LINK |