Difference between revisions of "LlGetStatus"

From Second Life Wiki
Jump to navigation Jump to search
(Add STATUS_DIE_AT_NO_ENTRY and STATUS_DIE_AT_EDGE to priority order, now that they work)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|inject-2={{Issues/SVC-5531}}{{Issues/SVC-1773}}{{Issues/SVC-4197}}
|func_id=46|func_sleep=0.0|func_energy=10.0
|func_id=46|func_sleep=0.0|func_energy=10.0
|func=llGetStatus
|func=llGetStatus
|return_type=integer|p1_type=integer|p1_name=status|p1_desc=STATUS_* flag
|return_type=integer|return_subtype=boolean
|p1_type=integer|p1_subtype=bit mask|p1_name=status|p1_desc=A single STATUS_* flag
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=boolean equal to the '''status''' of the object.
|return_text=equal to the {{LSLP|status}} of the object.
|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.
**[[STATUS_BLOCK_GRAB]] only really deals with the root prim. Try [[STATUS_BLOCK_GRAB_OBJECT]] instead.
*Querying for [[STATUS_CAST_SHADOWS]] always returns [[FALSE]] regardless of the setting.
*Only one flag should be specified at a time. As of Second Life Server 2022-09-09.574921, if more than one flag is specified, STATUS_DIE_AT_NO_ENTRY takes priority, followed by STATUS_BLOCK_GRAB_OBJECT, STATUS_DIE_AT_EDGE, STATUS_RETURN_AT_EDGE, STATUS_BLOCK_GRAB, STATUS_SANDBOX, STATUS_ROTATE_Z, STATUS_ROTATE_Y, STATUS_ROTATE_X, STATUS_PHANTOM, and STATUS_PHYSICS.
|constants={{LSL Constants/Status}}
|constants={{LSL Constants/Status}}
|examples=<lsl>default
|examples=<syntaxhighlight lang="lsl2">default
{
{
     touch_start(integer total_number)
     touch_start(integer total_number)
Line 22: Line 27:
         }
         }
     }
     }
}</lsl>
}</syntaxhighlight>
|helpers
|helpers
|also_functions=
|also_functions=
{{LSL DefineRow||{{LSLG|llSetStatus}}|Sets the object status.}}
{{LSL DefineRow||[[llSetStatus]]|Sets the object status.}}
|also_tests
|also_tests
|also_events
|also_events
|also_articles
|also_articles
|notes
|notes
|cat1
|cat1=Status
|cat2=Status
|cat2=Physics
|cat3=Physics
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 09:00, 24 September 2022

Summary

Function: integer llGetStatus( integer status );
0.0 Forced Delay
10.0 Energy

Returns a boolean (an integer) equal to the status of the object.

• integer status A single STATUS_* flag

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

  • Status is an object attribute; all prims in an object share the same status.
  • Querying for STATUS_CAST_SHADOWS always returns FALSE regardless of the setting.
  • Only one flag should be specified at a time. As of Second Life Server 2022-09-09.574921, if more than one flag is specified, STATUS_DIE_AT_NO_ENTRY takes priority, followed by STATUS_BLOCK_GRAB_OBJECT, STATUS_DIE_AT_EDGE, STATUS_RETURN_AT_EDGE, STATUS_BLOCK_GRAB, STATUS_SANDBOX, STATUS_ROTATE_Z, STATUS_ROTATE_Y, STATUS_ROTATE_X, STATUS_PHANTOM, and STATUS_PHYSICS.

Examples

default
{
    touch_start(integer total_number)
    {
        if (llGetStatus(STATUS_PHYSICS))
        {
            llSay(0, "This object is physical");
        }
        else
        {
            llSay(0, "This object is not physical");
        }
    }
}

See Also

Functions

•  llSetStatus Sets the object status.

Deep Notes

Signature

function integer llGetStatus( integer status );