Difference between revisions of "Remove Prim Properties"
Jump to navigation
Jump to search
Huney Jewell (talk | contribs) m (Deleted superfluous <lsl> tags) |
Huney Jewell (talk | contribs) (Added missing llSetStatus defaults) |
||
Line 4: | Line 4: | ||
When dropped onto a prim, the script will remove the designated property and delete itself from the prim. | When dropped onto a prim, the script will remove the designated property and delete itself from the prim. | ||
=====Remove Floating Text ([[ | =====Remove Floating Text ([[llSetText|llSetText]])===== | ||
<pre> | <pre> | ||
default { | default { | ||
Line 13: | Line 13: | ||
} | } | ||
</pre> | </pre> | ||
=====Remove Particles ([[ | =====Remove Particles ([[llParticleSystem|llParticleSystem]])===== | ||
<pre> | <pre> | ||
default { | default { | ||
Line 22: | Line 22: | ||
} | } | ||
</pre> | </pre> | ||
=====Remove Sit Target ([[ | =====Remove Sit Target ([[llSitTarget|llSitTarget]])===== | ||
<pre> | <pre> | ||
default { | default { | ||
Line 31: | Line 31: | ||
} | } | ||
</pre> | </pre> | ||
=====Reset Pie Menu "Sit" Option ([[ | =====Reset Pie Menu "Sit" Option ([[llSetSitText|llSetSitText]])===== | ||
<pre> | <pre> | ||
default { | default { | ||
Line 40: | Line 40: | ||
} | } | ||
</pre> | </pre> | ||
=====Remove Pie Menu "Touch" Option ([[ | =====Remove Pie Menu "Touch" Option ([[llSetTouchText|llSetTouchText]])===== | ||
<pre> | <pre> | ||
default { | default { | ||
Line 49: | Line 49: | ||
} | } | ||
</pre> | </pre> | ||
=====Reset to Default Prim Status ([[ | =====Reset to Default Prim Status ([[llSetStatus|llSetStatus]])===== | ||
<pre> | <pre> | ||
default { | default { | ||
state_entry() { | state_entry() { | ||
llSetStatus( STATUS_PHYSICS | STATUS_PHANTOM, FALSE); | |||
llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, TRUE); | |||
llRemoveInventory(llGetScriptName()); | llRemoveInventory(llGetScriptName()); | ||
} | } |
Revision as of 08:38, 14 September 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Prim Properties
Prim properties are attributes of a prim which are set via scripts, yet are retained by the prim even after the script is deleted from the prim. The two most common properties are floating text and particles. The scripts below show how to remove these properties from a prim.
When dropped onto a prim, the script will remove the designated property and delete itself from the prim.
Remove Floating Text (llSetText)
default { state_entry() { llSetText("", <0,0,0>, 0); llRemoveInventory(llGetScriptName()); } }
Remove Particles (llParticleSystem)
default { state_entry() { llParticleSystem([]); llRemoveInventory(llGetScriptName()); } }
Remove Sit Target (llSitTarget)
default { state_entry() { llSitTarget(ZERO_VECTOR, ZERO_ROTATION); llRemoveInventory(llGetScriptName()); } }
Reset Pie Menu "Sit" Option (llSetSitText)
default { state_entry() { llSetSitText(""); llRemoveInventory(llGetScriptName()); } }
Remove Pie Menu "Touch" Option (llSetTouchText)
default { state_entry() { llSetTouchText(""); llRemoveInventory(llGetScriptName()); } }
Reset to Default Prim Status (llSetStatus)
default { state_entry() { llSetStatus( STATUS_PHYSICS | STATUS_PHANTOM, FALSE); llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, TRUE); llRemoveInventory(llGetScriptName()); } }