LlDerezObject: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Lucia Nightfire (talk | contribs)
Clarified that the rezzer of the target object's root prim is what determines success/fail when using this function on any prim in a linkset.
Nexii Malthus (talk | contribs)
Clarify it is the derezzer's inventory
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|func_id=|func_sleep=0.0|func_energy=10.0
|func_id=|func_sleep=0.0|func_energy=10.0
|func=llDerezObject|return_type=integer
|func=llDerezObject
|return_type=integer|return_subtype=boolean
|p1_type=key|p1_name=id|p1_desc=The ID of an object in the region.
|p1_type=key|p1_name=id|p1_desc=The ID of an object in the region.
|p2_type=integer|p2_name=flag|p2_desc=Deletion options.
|p2_type=integer|p2_name=flag|p2_desc=Deletion options.
|func_desc=Derezzes an object previously rezzed from within the object containing the script.
|func_desc=Derezzes an object previously rezzed from within the object containing the script.
|return_text=Returns success or failure.
|return_text=which is TRUE for success or FALSE for failure.
|spec=
|spec=
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.  
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.
If the object is successfully deleted this function returns TRUE, if it fails for any reason it returns FALSE.
|caveats=
|caveats=
* The targeted object's rezzer must be the same as the object hosting this script
* The targeted object's rezzer must be the same as the object hosting this script
Line 15: Line 16:
* The target's owner must be the same as the script's owner.
* 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 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.
|examples
|examples
|helpers
|helpers
Line 31: Line 37:
{{!}} 1
{{!}} 1
{{!}} Mark the object as temporary so that the simulator will remove the object at a later time.
{{!}} Mark the object as temporary so that the simulator will remove the object at a later time.
{{!}}-
{{!}} [[DEREZ_TO_INVENTORY]]
{{!}} 2
{{!}} Returns the targeted object to derezzer's inventory and saves its current state.
{{!}}}
{{!}}}


Line 37: Line 47:
|notes
|notes
|cat1=Script
|cat1=Script
|cat2
|cat2=Stop
|cat3
|cat3=Cleanup
|cat4
|cat4
}}
}}

Latest revision as of 20:23, 21 April 2025

Summary

Function: integer llDerezObject( key id, integer flag );
0.0 Forced Delay
10.0 Energy

Derezzes an object previously rezzed from within the object containing the script.
Returns a boolean (an integer) which is TRUE for success or FALSE for failure.

• key id The ID of an object in the region.
• integer flag Deletion options.

Specification

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.

Constant Value Description
DEREZ_DIE 0 Immediately delete the object.
DEREZ_MAKE_TEMP 1 Mark the object as temporary so that the simulator will remove the object at a later time.
DEREZ_TO_INVENTORY 2 Returns the targeted object to derezzer's inventory and saves its current state.

Caveats

  • 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.

Examples

Deep Notes

Signature

function integer llDerezObject( key id, integer flag );