“LlEdgeOfWorld”的版本间的差异
| 第4行: | 第4行: | ||
{{函数详情 | {{函数详情 | ||
|函数名 = Function: integer llEdgeOfWorld( vector pos, vector dir ); | |函数名 = Function: integer llEdgeOfWorld( vector pos, vector dir ); | ||
| − | |参数= 参数: vector pos – | + | |参数= 参数: |
| + | *vector pos – 区域坐标中的位置 | ||
| − | vector dir – | + | *vector dir – 方向 |
|返回值= 返回值:返回一个布尔值(一个整数)。误报方向有模拟器指示。 | |返回值= 返回值:返回一个布尔值(一个整数)。误报方向有模拟器指示。 | ||
2021年8月17日 (二) 09:32的最新版本
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: integer llEdgeOfWorld( vector pos, vector dir ); |
参数:
|
| 返回值:返回一个布尔值(一个整数)。误报方向有模拟器指示。 |
| 注意事项 |
|---|
| 如果dir的x和y分量为零(与ZERO_VECTOR类似),则始终返回TRUE。
pos必须在区域内。 只能检测直接相邻区域,不能检测对角相邻区域 |
| 示例 |
|---|
示例1
//--// Tells if there are neighboring sims on touch //--//
default{
touch_start( integer vIntTouched ){
vector vPosObject = llGetPos();
if (!llEdgeOfWorld( vPosObject, <0.0, 1.0, 0.0> )){
llOwnerSay( "There is a Sim to the North" );
}
if (!llEdgeOfWorld( vPosObject, <1.0, 0.0, 0.0> )){
llOwnerSay( "There is a Sim to the East" );
}
if (!llEdgeOfWorld( vPosObject, <0.0, -1.0, 0.0> )){
llOwnerSay( "There is a Sim to the South" );
}
if (!llEdgeOfWorld( vPosObject, <-1.0, 0.0, 0.0> )){
llOwnerSay( "There is a Sim to the West" );
}
}
}
|
| 相关函数 |
|---|
| llScriptDanger |
| 相关事件 |
|---|
| 无 |