LlDie

来自人工智能助力教育知识百科
Qmf讨论 | 贡献2020年4月13日 (一) 10:57的版本 (创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: llDie( ); |参数= 参数:无 |返回值= 返回值:…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索

Template:Needs Translation/


函数名
Function: llDie( );
参数:无
返回值:无
注意事项
注意事项
  • The script may not stop executing immediately after this function is called (SVC-7421).
  • After this function is called there is no way to undo the deletion of the object.
  • Has no effect if called from within an attachment; there is no way to delete an attachment.
    • To detach an object from the avatar call llDetachFromAvatar.
    • Detaching a temporary attachment will cause the attachment to be deleted.
示例
示例1
default
{
    state_entry()
    {
        // red and opaque text
        llSetText("<!-- touch to kill --!>", <1.0, 0.0, 0.0>, 1.0);
    }
 
    touch_start(integer num_detected)
    {
        llSay(0, "Good bye, cruel world!");
        llDie();
    }
}
//Counts down from 5 to 1, then dies

示例2

default
{
    state_entry()
    {
        integer index = 5;
        while (index)
        {
            // wait a sec
            llSleep(1.0);
            llSay(0, (string)index);
            --index;
        }
        llDie();
    }
}
相关函数
llDetachFromAvatar

llBreakLink

相关事件