LlOwnerSay

来自人工智能助力教育知识百科
跳转至: 导航搜索

Template:Needs Translation/


函数名
Function: llOwnerSay( string msg );
参数:

• string msg – message to be transmitted

返回值:

如果物体的所有者当前位于同一区域,则只对该物体的所有者显示 msg。

注意事项
注意事项
  • 如果 msg 长于1024字节,它将被截断为1024字节。这可以传递1024个 ascii 字符,如果存在非 ascii 字符,则可以更少。
  • 在所有者离开对象所在的区域后45秒内静默失败。
  • 当脚本所连接的对象被注销到一个组时静默失败。
  • 当 msg 为空时,一些查看器不显示 llownersay 文本(“”)。
  • 产生漩涡粒子效果的拥有者(谁看到的信息) ,但这些效果似乎不是可见的其他阿凡达(谁不)。
示例
示例一
default
{
    touch_start(integer num_detected)
    {
        llOwnerSay("Ouch!");
    }
}

有用的片段

// llOwnerSay extension for preventing silent failures
// paste this code at the top of the script and replace
// any calls to llOwnerSay with uOwnerSayPlus
 
uOwnerSayPlus(string inputString)
{
    key owner = llGetOwner();
 
    // single owner that the region still has a handle for
    if (llKey2Name(owner))
    {
        llOwnerSay(inputString);
    }
    // group owned, must send the message publicly
    else if (llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]), 0) == owner)
    {
        llWhisper(0, "/me : " + inputString);
    }
    // single owner, not present, send them an IM
    else
    {
        llInstantMessage(owner, inputString);
    }
}
相关函数
llRegionSay--把聊天区域扩大

llWhisper-- 发送聊天限制到10米

llSay-- 发送聊天限制到20米

llShout-- 发送聊天限制到100米

llResionSayTo--发送私人聊天区域范围

llInstantMessage--把私人聊天发送到网络上的任何地方

相关事件