Difference between revisions of "Remove Prim Properties"

From Second Life Wiki
Jump to navigation Jump to search
 
(No difference)

Revision as of 12:11, 13 February 2007

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)
<lsl>
default {
    state_entry() {
        llSetText("", <0,0,0>, 0);
        llRemoveInventory(llGetScriptName());
    }
}
</lsl>
Remove Particles (llParticleSystem)
<lsl>
default {
    state_entry() {
        llParticleSystem([]);
        llRemoveInventory(llGetScriptName());
    }
}
</lsl>
Remove Sit Target (llSitTarget)
<lsl>
default {
    state_entry() {
        llSitTarget(ZERO_VECTOR, ZERO_ROTATION);
        llRemoveInventory(llGetScriptName());
    }
}
</lsl>
Reset Pie Menu "Sit" Option (llSetSitText)
<lsl>
default {
    state_entry() {
        llSetSitText("");
        llRemoveInventory(llGetScriptName());
    }
}
</lsl>
Remove Pie Menu "Touch" Option (llSetTouchText)
<lsl>
default {
    state_entry() {
        llSetTouchText("");
        llRemoveInventory(llGetScriptName());
    }
}
</lsl>
Reset to Default Prim Status (llSetStatus)

(not ready yet)

<lsl>
default {
    state_entry() {
        //
        llRemoveInventory(llGetScriptName());
    }
}
</lsl>