Skip to content
lsl.devlsl.devLSL Dev

llDie

function
Function syntax
llDie();
Energy
0

Deletes the object. The object does not go to the owner’s Inventory 🗑 Trash.

If called in any prim in the link set the result will be the deletion of the entire object.To remove a single prim from an object, use llBreakLink first.

How to use
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.

llRemoveInventory of llGetScriptName deletes just the calling script, rather than all of the objects that the calling script contains. For instance, you can write a script that chats a little when dragged onto an object from inventory and then politely disappears itself, such as:

// http://wiki.secondlife.com/wiki/llDie
default
{
state_entry()
{
llOwnerSay("llGetRegionTimeDilation()");
llOwnerSay((string) llGetRegionTimeDilation());
llRemoveInventory(llGetScriptName());
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from LlDie, by Linden Research, Inc. and contributing residents.View contributors and history.

Built from these wiki pages, as imported:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.