I am using this hide/ show script I pulled from the library. The toggle script works fine and the show hide script itself works fine but here is the issue I am having. When I put the show/hide script in a prim and log out sometimes when i log back in the script is gone from the prim, the toggle script is still there.
AND when I make a copy of the prim that has the show/hide script whether I drag a copy of it in world or whether I take a copy into inventory again the script disappears.
I have absolutely no explanation for this. Its like SL just hates this script. Here is the show hide script i am using. Please let me know if you are having similar issues or maybe even can think of a fix.
Show-hide
CODE
init()
{
llListen(69, "", "", "");
llSetAlpha(1, ALL_SIDES);
}
appear()
{
llSetAlpha(1, ALL_SIDES);
}
disappear()
{
llSetAlpha(0, ALL_SIDES);
}
default
{
state_entry()
{
init();
}
on_rez(integer start_param)
{
init();
}
attach(key attached)
{
init();
}
listen(integer chan, string name, key id, string msg)
{
if(llGetOwnerKey(id) == llGetOwner())
{
if(llToLower(msg) == "on" || llToLower(msg) == "both on")
{
disappear();
}
if(llToLower(msg) == "off")
{
appear();
}
}
}
}
*****************************************************************and here is the toggle script
CODE
integer on = 1;
default {
touch_start(integer n) {
if(on)
llSay(69, "on");
else
llSay(69, "off");
on = !on;
}
}
Good luck!