Invisiprim
This is the only working invisiprim script I have found. Retrieved from LSL Wiki. Just add it to an object and the object will become an avatar hiding invisiprim!
///////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);
}
}
}
OK I am a complete novice when it comes to scripting, and I have 2 questions about this – First, I see that it’s listening, presumably on Channel 0, for the uncloak command.
How do I modify this script to listen on a different channel? Where do I put the numbers in? And second, if it uncloaks, how do you re-cloak it again? I don’t see anything in the script that might do that.
Alright, that is fairly straight forward. To listen on a different channel, you just change the first argument of the llListen() funtion. For example, you can listen on channel 11 by changing llListen(0,”", owner, “”) to llListen(11,”", owner, “”).
As to the re-cloaking, you’re right, there is nothing in the script right now to do that. But here is a modified version of the script that does:
///////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);
}
if(msg == “recloak” )
{
llResetScript();
}
}
}