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

LSL Wiki : Invisiprim

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ec2-54-91-47-154.compute-1.amazonaws.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?
A: Because there is sometimes a glitch that can cause the textures to work incorrectly. Setting one then the other corrects this glitch. -NicholasKit

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.
There are 4 comments on this page. [Display comments/form]