“LlSitOnLink”的版本间的差异
| 第67行: | 第67行: | ||
}} | }} | ||
| + | 附录:(表格) | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| − | ! | + | ! Constant |
| − | ! | + | ! Value |
| − | ! | + | ! Description |
|- | |- | ||
| − | | | + | | SIT_NOT_EXPERIENCE, |
| − | | | + | | -1 |
| − | | | + | | The script is not running as part of an experience with a valid experience key or the experience is not allowed at your location. |
|- | |- | ||
| − | | | + | | SIT_NO_EXPERIENCE_PERMISSION |
| − | | | + | | -2 |
| − | | | + | | The agent has not granted permission. |
| + | |- | ||
| + | | SIT_NO_SIT_TARGET | ||
| + | | -3 | ||
| + | | Unable to find an open sit target. | ||
| + | |- | ||
| + | | SIT_INVALID_AGENT | ||
| + | | -4 | ||
| + | | Unable to find specified agent. | ||
| + | |- | ||
| + | | SIT_INVALID_LINK | ||
| + | | -5 | ||
| + | | Unable to find specified link or the link constant would return multiple prims. | ||
| + | |- | ||
| + | | SIT_NO_ACCESS | ||
| + | | -6 | ||
| + | | The avatar does not have access to the parcel that the prim running this script is located in. | ||
| + | |- | ||
| + | | SIT_INVALID_OBJECT | ||
| + | | -7 | ||
| + | | This value is returned if the llSitOnLink is trying to force the user to sit on something that cannot be sat upon (such as an attachment). | ||
|} | |} | ||
2020年8月12日 (三) 00:55的最新版本
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: Integer llSitOnLink( key agent_id, integer link ); |
| 参数:
•密钥代理_id–虚拟人物被迫坐下的UUID •整数链路–包含所需sit目标的prim的链路号 如果成功,此方法返回1。 如果函数失败,则返回一个负数常量。 表示单个prim的链接常量可用于Link参数。它们是LINK_ROOT和LINK iu THIS。其他常量,如LINK_SET、LINK峎CHILDREN、LINK峎ALL峎OTHERS将返回无效的\u LINK错误。 此方法必须从运行在已启用经验密钥的land上的启用体验的脚本调用。如果不满足这些条件,此方法将返回not_EXPERIENCE错误。 目标化身必须也接受了经验。如果用户没有参与体验,此方法将返回“无经验”权限。如果头像id找不到或不在已启用体验的陆地上,此方法将返回无效的_代理。 如果链接集中没有有效的sit目标,这个方法将不返回任何目标,并且不会对化身执行任何操作。 如果化身无法访问包含运行此脚本的prim的包,则此调用失败。 |
| 返回值:由agent_id指定的化身被强制坐在link参数指示的prim的sit目标上。如果指定的链路已经被占用,模拟器将在链路集中的PRIM链中搜索,寻找可用的sit目标。
返回一个整数 |
| 注意事项 |
|---|
| 表格参见附录 |
| 示例 |
|---|
示例1
integer gLinkId = LINK_THIS;
default
{
touch_start(integer total_number)
{
llRequestExperiencePermissions(llDetectedKey(0), "");
}
experience_permissions(key agent_id)
{
integer sitTest = llSitOnLink(agent_id, gLinkId);
if (sitTest != 1)
{
llInstantMessage(agent_id, "Cannot force agent " + (string)agent_id + " to sit due to reason id: " + (string)sitTest);
}
}
experience_permissions_denied(key agent_id, integer reason)
{
llInstantMessage(agent_id, "Denied experience permissions for " + (string)agent_id + " due to reason id: " + (string)reason);
}
}
|
| 相关函数 |
|---|
| llLinkSitTarget |
| 相关事件 |
|---|
| PRIM_ALLOW_UNSIT |
附录:(表格)
| Constant | Value | Description |
|---|---|---|
| SIT_NOT_EXPERIENCE, | -1 | The script is not running as part of an experience with a valid experience key or the experience is not allowed at your location. |
| SIT_NO_EXPERIENCE_PERMISSION | -2 | The agent has not granted permission. |
| SIT_NO_SIT_TARGET | -3 | Unable to find an open sit target. |
| SIT_INVALID_AGENT | -4 | Unable to find specified agent. |
| SIT_INVALID_LINK | -5 | Unable to find specified link or the link constant would return multiple prims. |
| SIT_NO_ACCESS | -6 | The avatar does not have access to the parcel that the prim running this script is located in. |
| SIT_INVALID_OBJECT | -7 | This value is returned if the llSitOnLink is trying to force the user to sit on something that cannot be sat upon (such as an attachment). |