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

From Second Life Wiki
Jump to navigation Jump to search
m (→‎'''Die in X Minutes''': had it set to on_rez rather than state entry.)
m (2 moar)
Line 1: Line 1:
These Scripts are for setting a quick param or doing something else to a prim.
'''These Scripts are for setting a quick param or doing something else to a prim.'''


== '''Just Die''' ==
== '''Just Die''' ==


Sometimes a body jest don't die natural.
Sometimes a prim jest don't die natural.
     default
     default
     {
     {
Line 11: Line 11:
         }
         }
     }
     }


== '''Die in X Minutes''' ==
== '''Die in X Minutes''' ==
Line 51: Line 50:
             llSetText(text,color,alpha);
             llSetText(text,color,alpha);
             llRemoveInventory(llGetScriptName());
             llRemoveInventory(llGetScriptName());
        }
    }
== '''Halt Rotation''' ==
    default
    {
        state_entry()
        {
                llTargetOmega(ZERO_VECTOR, 0, 0);
                llRemoveInventory(llGetScriptName());
        }
    }
== '''Clear Particles''' ==
    default
    {
        state_entry()
        {
                llParticleSystem([]);
                llRemoveInventory(llGetScriptName());
         }
         }
     }
     }

Revision as of 17:38, 6 January 2008

These Scripts are for setting a quick param or doing something else to a prim.

Just Die

Sometimes a prim jest don't die natural.

   default
   {
       state_entry()
       {
           llDie();
       }
   }

Die in X Minutes

   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();
       }
       
   }

Disposable Sit Target

   default
   {
       state_entry()
       {   
           llSitTarget(<0,0,0.5>;
           llRemoveInventory(llGetScriptName());
       }
   }

Set Hover Text

   string  text =  "";
   vector  color = <1.,1.,1.>;
   float   alpha = 1.0;
   default
   {
       state_entry()
       {
           llSetText(text,color,alpha);
           llRemoveInventory(llGetScriptName());
       }
   }

Halt Rotation

   default
   {
       state_entry()
       {
               llTargetOmega(ZERO_VECTOR, 0, 0);
               llRemoveInventory(llGetScriptName());
       }
   }

Clear Particles

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