Difference between revisions of "PRIM PHYSICS"
Jump to navigation
Jump to search
Void Singer (talk | contribs) m (+caveat) |
m (<lsl> tag to <source>) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
}}{{LSL Constant | }}{{LSL Constant | ||
|inject-2={{LSL PrimitiveParam Categorize|Object}} | |||
|name=PRIM_PHYSICS | |name=PRIM_PHYSICS | ||
|type=integer | |type=integer | ||
Line 14: | Line 15: | ||
|pa={{LSL Constant/List|i_front=[[llSetPrimitiveParams]]([ {{#var:physics_const}}, |i_end= ]); | |pa={{LSL Constant/List|i_front=[[llSetPrimitiveParams]]([ {{#var:physics_const}}, |i_end= ]); | ||
|text={{LSL Constant/PrimParamText|set}} | |text={{LSL Constant/PrimParamText|set}} | ||
|i1_type=integer|i1_name=boolean | |i1_type=integer|i1_subtype=boolean|i1_name=boolean | ||
|toc=llSetPrimitiveParams | |toc=llSetPrimitiveParams | ||
}} | }} | ||
Line 20: | Line 21: | ||
|r_front=Returns the list [ |r_end= ] | |r_front=Returns the list [ |r_end= ] | ||
|text={{LSL Constant/PrimParamText|get}} | |text={{LSL Constant/PrimParamText|get}} | ||
|r1_type=integer|r1_name=boolean | |r1_type=integer|r1_subtype=boolean|r1_name=boolean | ||
|toc=llGetPrimitiveParams | |toc=llGetPrimitiveParams | ||
}} | }} | ||
|examples= | |examples=<source lang="lsl2">default | ||
{ | |||
state_entry() | |||
{ | |||
llSetPrimitiveParams([PRIM_PHYSICS, TRUE]); // makes the object physical... | |||
integer isPhysical = llList2Integer(llGetPrimitiveParams([PRIM_PHYSICS]), 0); | |||
if( isPhysical == 1 ) | |||
{ | |||
llSetText("Object is Physical", <1, 1, 1>, 1.0); | |||
} | |||
else | |||
{ | |||
llSetText("Object is non-Physical", <1, 1, 1>, 1.0); | |||
} | |||
} | |||
}</source> | |||
|caveats= | |caveats= | ||
*calls to set PRIM_PHYSICS in attachments fail silently | *calls to set PRIM_PHYSICS in attachments fail silently | ||
Line 36: | Line 55: | ||
|events | |events | ||
|location | |location | ||
|cat1= | |cat1=Status | ||
|cat2= | |cat2=Physics | ||
|cat3 | |cat3 | ||
}} | }} |
Latest revision as of 15:48, 23 January 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Description
Constant: integer PRIM_PHYSICS = 3;llSetPrimitiveParams
llSetPrimitiveParams([ PRIM_PHYSICS, integer boolean ]);• integer | boolean | – | TRUE enables, FALSE disables |
The same syntax applies to llSetLinkPrimitiveParams and llSetLinkPrimitiveParamsFast but with an additional prefixed link parameter in the function call.
llGetPrimitiveParams
llGetPrimitiveParams([ PRIM_PHYSICS ]);Caveats
- calls to set PRIM_PHYSICS in attachments fail silently
Related Articles
Constants
• | STATUS_PHYSICS |
Functions
• | llSetPrimitiveParams | |||
• | llSetLinkPrimitiveParams | |||
• | llGetPrimitiveParams | |||
• | llSetStatus | |||
• | llGetStatus |
Examples
default
{
state_entry()
{
llSetPrimitiveParams([PRIM_PHYSICS, TRUE]); // makes the object physical...
integer isPhysical = llList2Integer(llGetPrimitiveParams([PRIM_PHYSICS]), 0);
if( isPhysical == 1 )
{
llSetText("Object is Physical", <1, 1, 1>, 1.0);
}
else
{
llSetText("Object is non-Physical", <1, 1, 1>, 1.0);
}
}
}