Template:Needs Translation/
| 函数名
|
| Function: llListenRemove( integer handle );
|
| 参数:
integer handle – handle to control listen event
|
| 返回值:
删除监听事件回调句柄
|
| 注意事项
|
*在状态更改或脚本重置时,所有监听都会自动删除。
状态更改可用作释放脚本中所有监听的快捷方式。
|
| 示例
|
示例一
// Listen for one line of chat from the owner, echo it back to them, then stop listening
integer ListenHandle;
default
{
state_entry()
{
// Start listening on channel 0, for text from owner only
ListenHandle = llListen(0, "", llGetOwner(), "");
}
listen(integer channel, string name, key id, string message)
{
llOwnerSay(message); // Echo the message back to the owner
llListenRemove(ListenHandle); // Stop listening
}
}
|