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();
}
}
|