Difference between revisions of "LlSetStatus"

From Second Life Wiki
Jump to: navigation, search
m (Replaced old <LSL> block with <source lang="lsl2">)
m (BUG-40630 additions (note that STATUS_ROATE_X|Y|Z only affect physical movement))
 
Line 13: Line 13:
 
***Use [[STATUS_BLOCK_GRAB_OBJECT]] to block grabbing of a link_set.
 
***Use [[STATUS_BLOCK_GRAB_OBJECT]] to block grabbing of a link_set.
 
* Setting [[STATUS_PHYSICS]] fails silently in attached objects. ~ [[#SVC-6549]]
 
* Setting [[STATUS_PHYSICS]] fails silently in attached objects. ~ [[#SVC-6549]]
 +
* The [[STATUS_ROTATE_X]], [[STATUS_ROTATE_Y]] and [[STATUS_ROTATE_Z]] flags all require that the object first be made physical to have any effect.
 
|constants={{LSL Constants/Status}}
 
|constants={{LSL Constants/Status}}
 
|examples=<source lang="lsl2">default
 
|examples=<source lang="lsl2">default

Latest revision as of 04:21, 11 October 2016

Summary

Function: llSetStatus( integer status, integer value );

Sets the object status attributes indicated in the status} mask to value

• integer status bit mask, STATUS_* flags
• integer value boolean, TRUE enables, FALSE disables
Constants Value Default Description
STATUS_PHYSICS 0x001 FALSE Object is physical
STATUS_ROTATE_X 0x002 TRUE Can turn along this axis (physical objects only)
STATUS_ROTATE_Y 0x004 TRUE Can turn along this axis (physical objects only)
STATUS_ROTATE_Z 0x008 TRUE Can turn along this axis (physical objects only)
STATUS_PHANTOM 0x010 FALSE Object is phantom
STATUS_SANDBOX 0x020 FALSE Keep object within 10 meters and in the same region
Constants Value Default Description
STATUS_BLOCK_GRAB 0x040 FALSE Prevent click-and-drag movement on the root prim
STATUS_DIE_AT_EDGE 0x080 FALSE delete and do not return object if it goes off world
STATUS_RETURN_AT_EDGE 0x100 FALSE return object to owner if it goes off world
STATUS_CAST_SHADOWS 0x200 TRUE not currently used
STATUS_BLOCK_GRAB_OBJECT 0x400 FALSE Prevent click-and-drag movement on all prims in the object
STATUS_DIE_AT_EDGE - If the object is rezzed by a script, the default is TRUE

Caveats

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   llSetStatus can't change STATUS_PHYSICS of an attachment despite the status being preserved between attach & drop
   llGetStatus(STATUS_ROTATE_Z); will not work on child prims on freshly rezzed objects.

Examples

default
{
    state_entry()
    {
        llSetStatus( STATUS_DIE_AT_EDGE | STATUS_PHYSICS, TRUE);
        llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE);
    }
}

See Also

Functions

•  llGetStatus Gets the object status.

Deep Notes

All Issues

~ Search JIRA for related Issues
   llSetStatus can't change STATUS_PHYSICS of an attachment despite the status being preserved between attach & drop
   llGetStatus(STATUS_ROTATE_Z); will not work on child prims on freshly rezzed objects.
   STATUS_BLOCK_GRAB only affects individual prims in a linkset
   Create STATUS_TRANSLATE_* flags for llSetStatus
   New constant STATUS_BLOCK_SIT
   STATUS_PARCEL_BOUND status to prevent a physical object from being able to leave the bounds of the current parcel.

Signature

function void llSetStatus( integer status, integer value );