Duchy of Darkmere

Blingtardia Delenda Est


It is currently Sun Nov 29, 2009 9:53 am

All times are UTC



Welcome
Welcome to <strong>Duchy of Darkmere</strong>.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Persistent Prim Properties
PostPosted: Sat Dec 22, 2007 11:47 am 
Offline
Darkmerese

Joined: Fri Aug 17, 2007 3:17 pm
Posts: 2255
Various Prim effects stay even after scripts are removed -- this provides a way to remove prim-remembered FX. Drop this script into the affected prim, then touch it.

Code:
// Just drop this script into a scriptless prim that has lingering effets you don't want, "Touch" it to brng up the menu.


list buttons =["SitTarget", "FloatText", "Particles","TextureAn", "Sound", "TargetOmega", "ALL", "DESTRUCT"];

string menutext = " \nSitTarget : Clears Sit Position\nFloatText : Clears Floating Text\nParticles : Clears Particle Generation\nTextureAn : Clears Texture Animation\nTargetOmega: clears llTargetOmega()\nALL : Clears all of the above\nDESTRUCT : Removes script from prim";

integer handler;

default
{
    state_entry()
    {
        if (handler)
        {
            llListenRemove(handler);   
        }
        handler =llListen(1,"",llGetOwner(),"");
     }
     touch_start(integer num_detected)
     {
         llDialog(llGetOwner(), menutext, buttons, 1);
    }
    listen( integer channel, string name, key id, string message )
    {
        string lowmsg = llToLower(message);
        if (lowmsg == "sittarget")
        {
            llWhisper(0,"Clearing Sit Position.");
            llSitTarget(ZERO_VECTOR,ZERO_ROTATION);
        }
        if (lowmsg == "floattext")
        {
            llWhisper(0,"Clearing Floating Text.");
            llSetText("", <1,1,1>, 0.0);
        }
        if (lowmsg == "particles")
        {
            llWhisper(0,"Clearing Particles.");
            llParticleSystem([]);
        }
        if (lowmsg == "texturean")
        {
            llWhisper(0,"Clearing Texture Animation.");
            llSetTextureAnim(FALSE, ALL_SIDES,0,0,0.0, 1,0.0);
        }
        if(lowmsg == "targetomega")
        {
            llWhisper(0, "Clearing llTargetOmega().");
            llTargetOmega(ZERO_VECTOR, 0.0, 1.0);
        }
        if(lowmsg == "sound")
        {
            llWhisper(0, "Clearing Sounds.");
            llStopSound();
        }
        if (lowmsg == "all")
        {
            llWhisper(0,"Clearing Floating Text.");
            llSetText("", <1,1,1>, 0.0);
            llWhisper(0,"Clearing Texture Animation.");
            llSetTextureAnim(FALSE, ALL_SIDES,0,0,0.0, 1,0.0);
            llWhisper(0,"Clearing Particles.");
            llParticleSystem([]);
            llWhisper(0,"Clearing Sit Position.");
            llSitTarget(ZERO_VECTOR,ZERO_ROTATION);
            llWhisper(0, "Clearing llTargetOmega().");
            llTargetOmega(ZERO_VECTOR, 0.0, 1.0);
            llStopSound();
        }
        if (lowmsg == "destruct")
        {
            llWhisper(0,"Removing script from prim in 0.2 seconds");
            llSleep(0.2);
            llRemoveInventory(llGetScriptName());       
        }
    }
}

_________________
-~-Beezle-~-

Though this be madness, yet there is method in't.
-- William Shakespeare

Warburton's Whimsies:
In SL
Apez.biz


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 22, 2007 12:23 pm 
Offline
Friend of Darkmere
User avatar

Joined: Sat Aug 18, 2007 3:44 am
Posts: 756
Nifty. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron