LlLoadURL

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

Template:Needs Translation/


函数名
函数: llloadurl (键头像,字符串消息,字符串 url) ;
参数:

key avatar – avatar UUID that is in the same region

string message – message to be displayed in the dialog box

string url

返回值:

如果用户点击 yes,在他们的浏览器中启动页面,如果需要的话启动浏览器. Url 被截断为255个字符,消息被截断为254个字符。 url 的协议必须指定,目前只支持“ https://”和“ http://”。 url 应该是 rfc-1738兼容适当的转义

注意事项
*这个函数使脚本休眠0.1秒。
  • 这个函数不应该从分组注册的对象[1]中调用,它会无声地失败。
  • 对于静音的化身,这个功能会悄悄地失败
示例
示例一
default
{
    touch_start(integer num_detected)
    {
        key     id              = llDetectedKey(0);
        integer avatarInSameSim = (llGetAgentSize(id) != ZERO_VECTOR);// TRUE or FALSE
 
        if (avatarInSameSim)
        {
            string info = "Visit the Second Life website!";
 
            // must start with either "http://..." or "https://..."
            string url = "http://www.secondlife.com/";
 
            llLoadURL(id, info, url);
        }
        else
        {
            llInstantMessage(id, "I can only open a URL dialog on your screen if you're in my sim!");
        }
    }
}
相关函数
相关事件