Difference between revisions of "User:Clarknova Helvetic/Clear Param Widgets"

From Second Life Wiki
Jump to navigation Jump to search
m (<lsl> tags)
Line 3: Line 3:
== '''Just Die''' ==
== '''Just Die''' ==
Sometimes a prim jest don't die natural.
Sometimes a prim jest don't die natural.
    default
<lsl>default
    {
{
        state_entry()
  state_entry()
        {
  {
            llDie();
    llDie();
        }
  }
    }
}</lsl>


== '''Die in X Minutes''' ==
== '''Die in X Minutes''' ==
Enter minutes in whole numbers, then drop script into prim  
Enter minutes in whole numbers, then drop script into prim  
    integer minutes = 20;  // Change this to the number of minutes for the object to live.
<lsl>integer minutes = 20;  // Change this to the number of minutes for the object to live.
      
      
    default
default
    {
{
        state_entry() { llSetTimerEvent((float)minutes*60.); }
    state_entry() { llSetTimerEvent((float)minutes*60.); }
        timer()
    timer()
        {
    {
            llInstantMessage(llGetOwner(),(string)llRound(minutes) + " minutes expired.  " + llGetObjectName() + " deleted.");
        llInstantMessage(llGetOwner(),(string)llRound(minutes) + " minutes expired.  " + llGetObjectName() + " deleted.");
            llDie();
        llDie();
        }
      }
       
}</lsl>
    }


== '''Clear Hover Text''' ==
== '''Clear Hover Text''' ==
    default
<lsl>default
    {
{
        state_entry()
    state_entry()
        {
    {
            llSetText("",ZERO_VECTOR,0.);
        llSetText("",ZERO_VECTOR,0.);
            llRemoveInventory(llGetScriptName());
        llRemoveInventory(llGetScriptName());
        }
    }
    }
}</lsl>


== '''Clear Particles''' ==
== '''Clear Particles''' ==
    default
<lsl>default
    {
{
        state_entry()
    state_entry()
        {
    {
                llParticleSystem([]);
          llParticleSystem([]);
                llRemoveInventory(llGetScriptName());
          llRemoveInventory(llGetScriptName());
        }
      }
    }
}</lsl>


== '''Stop Sound''' ==
== '''Stop Sound''' ==
    default
<lsl>default
    {
{
        state_entry()
    state_entry()
        {
    {
            llStopSound();
        llStopSound();
            llRemoveInventory(llGetScriptName());
        llRemoveInventory(llGetScriptName());
        }
    }
    }
}</lsl>

Revision as of 12:44, 8 January 2008

These Scripts clear a single param. Drag 'n drop.

Just Die

Sometimes a prim jest don't die natural. <lsl>default {

  state_entry()
  {
    llDie();
  }

}</lsl>

Die in X Minutes

Enter minutes in whole numbers, then drop script into prim <lsl>integer minutes = 20; // Change this to the number of minutes for the object to live.

default {

    state_entry() { llSetTimerEvent((float)minutes*60.); }
    timer()
    {
        llInstantMessage(llGetOwner(),(string)llRound(minutes) + " minutes expired.  " + llGetObjectName() + " deleted.");
        llDie();
     }

}</lsl>

Clear Hover Text

<lsl>default {

    state_entry()
    {
        llSetText("",ZERO_VECTOR,0.);
        llRemoveInventory(llGetScriptName());
    }

}</lsl>

Clear Particles

<lsl>default {

    state_entry()
    {
         llParticleSystem([]);
         llRemoveInventory(llGetScriptName());
     }

}</lsl>

Stop Sound

<lsl>default {

    state_entry()
    {
        llStopSound();
        llRemoveInventory(llGetScriptName());
    }

}</lsl>