Skip to content

llDerezObject

integer llDerezObject(key ID, integer flags)

Derezzes an object previously rezzed by a script in this region. Returns TRUE on success or FALSE if the object could not be derezzed.

Parameters
ID (key)
The ID of an object in the region.
flags (integer)
Flags for derez behavior.

Deletes, or marks temporary, 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:
    • 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