Difference between revisions of "PRIM PHANTOM"

From Second Life Wiki
Jump to navigation Jump to search
m
m (<lsl> tag to <source>)
 
(10 intermediate revisions by 3 users not shown)
Line 8: Line 8:


}}{{LSL Constant
}}{{LSL Constant
|inject-2={{LSL PrimitiveParam Categorize|Object}}
|name=PRIM_PHANTOM
|name=PRIM_PHANTOM
|type=integer
|type=integer
|value=5
|value=5
|desc=Used to get or set the object's phantom status.
|desc=Used to get or set the object's [[STATUS_PHANTOM|phantom]] {{LSLGC|Status|status}}.
|pa={{LSL Constant/List|i_front=[&#32;{{#var:phantom_const}},&#32;|i_end=&nbsp;]
|pa={{LSL Constant/List|i_front=[&#32;{{#var:phantom_const}},&#32;|i_end=&nbsp;]
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]
|i1_type=integer|i1_name=boolean
*NOTE: This sets the entire object (linkset) when used in either function.
|i1_type=integer|i1_subtype=boolean|i1_name=boolean
|toc=llSetPrimitiveParams
}}
}}
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([&nbsp;{{#var:phantom_const}}|i_end=&nbsp;]);|
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([&nbsp;{{#var:phantom_const}}|i_end=&nbsp;]);|
|r_front=Returns the list [&nbsp;|r_end=&nbsp;]
|r_front=Returns the list [&nbsp;|r_end=&nbsp;]
|text
|text
|r1_type=integer|r1_name=boolean
|r1_type=integer|r1_subtype=boolean|r1_name=boolean
|toc=llGetPrimitiveParams
}}
}}
|examples=
|examples=<source lang="lsl2">default
{
    state_entry()
    {
        llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); // makes the object phantom...
       
        integer isPhantom = llList2Integer(llGetPrimitiveParams([PRIM_PHANTOM]), 0);
       
        if( isPhantom == 1 )
        {
            llSetText("Object is Phantom", <1, 1, 1>, 1.0);
        }
       
        else
        {
            llSetText("Object is Solid", <1, 1, 1>, 1.0);
        }
    }
}</source>
|constants=
|constants=
{{LSL DefineRow||[[STATUS_PHANTOM]]|}}
|functions=
|functions=
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}}
{{LSL DefineRow||[[llGetPrimitiveParams]]|}}
{{LSL DefineRow||[[llGetPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetStatus]]|}}
{{LSL DefineRow||[[llGetStatus]]|}}
|events=
|events=
{{LSL DefineRow||[[changed]]|}}
{{LSL DefineRow||[[changed]]|}}
|location
|location
|cat1=Prim
|cat1
|cat2=Status
|cat2=Status
|cat3
|cat3=Phantom
|cat4
|cat4
}}
}}

Latest revision as of 16:47, 23 January 2015

Description

Constant: integer PRIM_PHANTOM = 5;

The integer constant PRIM_PHANTOM has the value 5

Used to get or set the object's phantom status.

llSetPrimitiveParams

[ PRIM_PHANTOM, integer boolean ]
• integer boolean TRUE enables, FALSE disables

When used with llSetPrimitiveParams & llSetLinkPrimitiveParams

  • NOTE: This sets the entire object (linkset) when used in either function.

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_PHANTOM ]);

Returns the list [ integer boolean ]

• integer boolean TRUE enables, FALSE disables

Related Articles

Constants

•  STATUS_PHANTOM

Functions

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams
•  llSetStatus
•  llGetStatus

Events

•  changed

Examples

default
{
    state_entry()
    {
        llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); // makes the object phantom...
        
        integer isPhantom = llList2Integer(llGetPrimitiveParams([PRIM_PHANTOM]), 0);
        
        if( isPhantom == 1 )
        {
            llSetText("Object is Phantom", <1, 1, 1>, 1.0);
        }
        
        else
        {
            llSetText("Object is Solid", <1, 1, 1>, 1.0);
        }
    }
}

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_PHANTOM = 5;