Difference between revisions of "LlSetStatus"

From Second Life Wiki
Jump to navigation Jump to search
m
m (BUG-40630 additions (note that STATUS_ROATE_X|Y|Z only affect physical movement))
 
(16 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Issues/SVC-1773}}{{LSL_Function
{{LSL_Function
|inject-2={{Issues/SVC-6549}}{{Issues/SVC-5531}}{{Issues/SVC-1773}}{{Issues/SVC-4197}}{{Issues/SVC-5723}}{{Issues/SCR-203}}{{LSL_Function/boolean|value|bool=*}}
|func_id=45|func_sleep=0.0|func_energy=10.0
|func_id=45|func_sleep=0.0|func_energy=10.0
|func=llSetStatus
|func=llSetStatus
|p1_type=integer|p1_name=status|p1_desc=bit mask, STATUS_* flags
|p1_type=integer|p1_subtype=bit mask|p1_name=status|p1_desc=bit mask, STATUS_* flags
|p2_type=integer|p2_name=value|p2_desc=boolean
|p2_type=integer|p2_name=value
|func_footnote
|func_footnote
|func_desc=Sets the object status attributes indicated in the '''status''' mask to '''value'''
|func_desc=Sets the object status attributes indicated in the {{LSLP|status}}} mask to {{LSLP|value}}
|return_text
|return_text
|spec
|spec
|caveats=*Status is an object attribute; all prims in an object share the same status.
|caveats=*Status is an object attribute; all prims in an object share the same status.
** Except for STATUS_BLOCK_GRAB, this only affects the prim the script is in, child prims in linked objects will not be affected.
** Except for [[STATUS_BLOCK_GRAB]], this only affects the prim the script is in, child prims in linked objects will not be affected.
***Use [[STATUS_BLOCK_GRAB_OBJECT]] to block grabbing of a link_set.
* 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=<lsl>default
|examples=<source lang="lsl2">default
{
{
     state_entry()
     state_entry()
Line 18: Line 22:
         llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE);
         llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE);
     }
     }
}</lsl>
}</source>
 
If STATUS_BLOCK_GRAB is to be set TRUE for all prims in a linked set, the following script can be run in each prim to set the flag:
 
<lsl>default
{
    state_entry() {
        llSetStatus(STATUS_BLOCK_GRAB,TRUE);          // Set 'No grab' flag on prim.
        llOwnerSay("'No Grab' was set!");
        llRemoveInventory(llGetScriptName());
    }
}</lsl>
 
See JIRA comment [http://jira.secondlife.com/browse/SVC-1773 SVC-1773] for more information until resolved.


|helpers
|helpers

Latest revision as of 03:21, 11 October 2016

Summary

Function: llSetStatus( integer status, integer value );
0.0 Forced Delay
10.0 Energy

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
STATUS_BLOCK_GRAB 0x040 FALSE Prevent click-and-drag movement on the root prim
Constants Value Default Description
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_NO_ENTRY 0x800 FALSE Delete and do not return object if it cannot enter a parcel
* STATUS_DIE_AT_EDGE - If the object is rezzed by a script, the default is TRUE
STATUS_DIE_AT_NO_ENTRY - No-copy objects ignore this flag and remain in-world

Caveats

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

Signature

function void llSetStatus( integer status, integer value );