查看“LlBreakLink”的源代码
←
LlBreakLink
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: llBreakLink( integer link ); |参数= 参数:integer link – Link number (0: unlinked, 1: root prim, >1: child prims and seated avatars) |返回值= 返回值:Delinks the prim with the given link number in a linked object set |注意事项=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 link currently supports is LINK_ROOT. SVC-3510 Use [[llGetLinkNumber]]() as the parameter to unlink the script's prim, not LINK_THIS. Use [[llBreakAllLinks]]() instead of using LINK_SET, LINK_ALL_CHILDREN, or LINK_ALL_OTHERS as the parameter for llBreakLink. To run this function the script must request the PERMISSION_CHANGE_LINKS permission with [[llRequestPermissions]] and it must be granted by the owner. <pre> 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. </pre> |示例= <pre> //-- requests permission to change links, then breaks the link //-- between the prim and the rest of the object, on touch. default{ touch_start( integer vIntTouched ) { llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS ); } run_time_permissions( integer perm ) { if(perm & PERMISSION_CHANGE_LINKS) { llBreakLink( llGetLinkNumber() ); } } } </pre> |相关函数= [[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 |相关事件= run_time_permissions – Permission receiving event changed – CHANGED_LINK }}
该页面使用的模板:
模板:LSL Header
(
查看源代码
)
模板:LSLC
(
查看源代码
)
模板:LSLGC
(
查看源代码
)
模板:Multi-lang
(
查看源代码
)
模板:函数详情
(
查看源代码
)
返回至
LlBreakLink
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
网站首页
知识百科
编辑帮助
最近更改
工具
链入页面
相关更改
特殊页面
页面信息