Difference between revisions of "PRIM PHANTOM"

From Second Life Wiki
Jump to navigation Jump to search
m
(added an example)
Line 25: Line 25:
|toc=llGetPrimitiveParams
|toc=llGetPrimitiveParams
}}
}}
|examples=
|examples=<lsl>default
{
    state_entry()
    {
        llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); // makes the prim 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);
        }
    }
}</lsl>
|constants=
|constants=
{{LSL DefineRow||[[STATUS_PHANTOM]]|}}
{{LSL DefineRow||[[STATUS_PHANTOM]]|}}

Revision as of 02:12, 25 November 2013

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

<lsl>default {

   state_entry()
   {
       llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); // makes the prim 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);
       }
   }

}</lsl>

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_PHANTOM = 5;