Don't click here unless you want to be banned.

LSL Wiki : Invisiprim

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are xcrawl107.alexa.com
Invisiprim
Invisiprim is a script that makes an object completely invisible using a texture, or a UUID. When you put this in an object, It makes the object invisible, and everything behind it from the view.

This Makes the prim COMPLETELY invis, so you cannot see it even in Highlight transparent view.

///////Created by Joker Opus, November 8th//////
       //Feel free to mod this, do not steal//
              
default
{
    state_entry()
    {
        key owner = llGetOwner();
        llListen(0,"",owner,"");
        llSetTexture("38b86f85-2575-52a9-a531-23108d8da837", ALL_SIDES);
        llSetTexture("e97cf410-8e61-7005-ec06-629eba4cd1fb", ALL_SIDES);                     //This is all the textures and functions that formulate the invisiprim
        llSetPrimitiveParams([PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_NONE, PRIM_BUMP_BRIGHT]);
        llOffsetTexture(0.468, 0.0, ALL_SIDES);
        llScaleTexture(0.0, 0.0, ALL_SIDES);
        llSetAlpha(1.0, ALL_SIDES);
        llSetTimerEvent(5);
        }
     listen(integer channel, string name, key id, string msg)
    {
        if( msg== "uncloak" )
        {                                          //When you say uncloak, it will go back to a non-invisiprim.
       llSetTexture("4c1ce202-4196-f1c1-0409-367b3a71543e", ALL_SIDES);
        }
    }
}

Q: Why do you use llSetTexture twice... right after eachother. The second just overrides the first... Isn't llSetTexture("e97cf410-8e61-7005-ec06-629eba4cd1fb", ALL_SIDES); enough?

Q: I dont understand why you use llSetTimerEvent, beceause the handler event is not programmed.


The script below should do about the same, but now with touching it. When placed in an object, the object becomes visible on a touch and goes invisible again by the next touch.

// Created by Opus Beck 9 aug 2007
              
default
{
    state_entry()
    {
        llSetTexture("e97cf410-8e61-7005-ec06-629eba4cd1fb", ALL_SIDES); // This is one of the invisiprim textures.
        llSetAlpha(1.0, ALL_SIDES);
    }
     touch(integer num)
    {
        if( llDetectedKey(0) == llGetOwner() )
        { //When touched, it will go back to a non-invisiprim.
              state blank;
        }
    }
}

state blank
{
    state_entry()
    {
        llSetTexture("4c1ce202-4196-f1c1-0409-367b3a71543e", ALL_SIDES); // This is the 'Blank' texture
        llSetAlpha(1.0, ALL_SIDES);
    }
     touch(integer num)
    {
        if( llDetectedKey(0) == llGetOwner() )
        { //When touched, it will go back to an invisiprim.
              state default;
        }
    }
}

The invisiprim texture makes all objects with Alpha smaller then 1.0 and avatars invisible, so if you're wearing it and travalling through clouds, your presence will be noticed beceause you as well as the clouds covered by the invisiprim are hidden by the invisiprim.
Comments [Hide comments/form]
And how do you use this? There is very little info about invisiprims out there. How do you attach the code to the object you want to be invisible? Thanks for any suggestions.
-- static-66-16-74-129.dsl.cavtel.net (2007-03-25 08:48:26)
whats the use of the timer event here, anyway?
-- zep16.it-austria.net (2007-05-25 07:09:15)
is this like harry potter's cloak?
-- 62-30-202-177.cable.ubr02.chap.blueyonder.co.uk (2007-06-06 15:51:15)
For what?
If you are making such a pannel, with transp. buttons (in any touch event)
Using simple alpha, dont turns the mouse pointer to a hand when over the prim.
With this, we can make it shown.
(if there's some masked(alpha) area in the background it will hide)
-- Brun0Beck (2007-10-01 04:02:50)
Attach a comment to this page: