Thursday, August 14, 2014

The Scrubber [Level I]

It can be annoying when you have a prim that makes a sound you can't turn off, or produces particles you can't turn off, or has a sit position you can't turn off, or has a texture animation or an omega rotation you can't turn off. Even if the script is removed, the prim's behavior persists. It can drive you crazy.

The Scrubber is a handy script that rids a prim of just about any residual effect of previous scripts and then handily deletes itself. You just open the Edit window, click the Content tab, drag the script from inventory, let go of it, and it does its work in seconds.

I had written my own temporary scripts to stop one thing or another a prim was doing, but when I came across The Scrubber, I was like Doh!

The Scrubber is written by Jopsy Pendragon, one of Second Life's oldest residents, a master scripter, and the architect of the many wonders at his Teal sim. Jopsy's Particle Lab is a great introduction to making your own particle effects, and he provides free modular scirpts to help you create popular effects.

Jopsy's Scrubber does the following:

  • Removes Sit Text (What you see in the Sit display area when you right click an object)
  • Removes Touch Text (What you see in the Touch display area when you right click an object)
  • Stops Particles
  • Stops Sound (adding this line was my own small contribution. For some reason, Jopsy left it out)
  • Stops Omega Rotation
  • Resets Camera Parameters to Zero Rotation
  • Stops Texture Animation
  • Clears the Sit Target
  • Tells you the prim is clean
  • Deletes itself.
Be sure to create the script in your inventory, for once it runs in a prim, it's gone.

If you own land and develop it, this handy script will be your new best friend.

To make your own copy of The Scrubber, visit my free script area on Whimsy or create a new script, rename it The Scrubber, paste in the following code, and Save.

//
// The Scrubber
// Jopsy Pendragon, Feb 10 2006, Version 1
// Just drop this script on a prim that's giving you grief.
// It will reset/unset most persistant prim settings that can only be set by scripts.

// Modified by Cheyenne Palisades to stop sound

default
{
    state_entry()
    {
        llSetSitText( "" );
        llSetTouchText( "" );
        llParticleSystem( [ ] );
        llStopSound(); // Chey's tiny contribution
        llSetText( "", ZERO_VECTOR, 1.0 );
        llTargetOmega( ZERO_VECTOR, 0, 0 );
        llSetCameraAtOffset( ZERO_VECTOR );
        llSetCameraEyeOffset( ZERO_VECTOR );
        llSitTarget( ZERO_VECTOR, ZERO_ROTATION );
        llSetTextureAnim( FALSE , ALL_SIDES, 1, 1, 0, 0, 0.0 );
        llOwnerSay("This Prim is Clean... ");
        llRemoveInventory( llGetScriptName() );
        // vanish without a trace...
    }
}

// End

No comments:

Post a Comment