Skip to content
lsl.devlsl.devLSL Dev

llDerezObject

function
Function syntax
integer llDerezObject(
  1. key id,// UUID of the object in the region to derez.
  2. integer flags// Derez behavior flags matching DEREZ_* constants. Values: DerezMode
);
Returns
integer
Energy
10

Derezzes (deletes or returns) a targeted object in the region previously rezzed by a script in this linkset, returning TRUE on success or FALSE on failure.

Derezzes an object previously rezzed from within the object containing the script.

Returns an integer which is TRUE for success or FALSE for failure.

How to use
integer result = llDerezObject(NULL_KEY, 0);

Deletes, or marks temp, an object that was previously rezzed by this script. The object’s root prim must have been previously rezzed from a script within this object.

If the object is successfully deleted this function returns TRUE, if it fails for any reason it returns FALSE.

ConstantValueDescription
DEREZ_DIE0Immediately delete the object.
DEREZ_MAKE_TEMP1Mark the object as temporary so that the simulator will remove the object at a later time.
DEREZ_TO_INVENTORY2Returns the targeted object to derezzer’s inventory and saves its current state.
  • The targeted object’s rezzer must be the same as the object hosting this script
  • The target must not be an attachment
  • The target must be copyable
  • The target’s owner must be the same as the script’s owner.
  • When marking an object as temporary, the object must not contribute to the navmesh.
  • When using DEREZ_TO_INVENTORY there are a few other restrictions:
  • The derezzer must not be an attachment.
  • The derezzer must be modifiable.
  • The object in the derezzer’s inventory must still exist.
  • The object in the derezzer’s inventory must not be a coalesced object.
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 LlDerezObject, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

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.