Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Invis Script - I must be missing something obvious.

Charron Marseille
Registered User
Join date: 10 Oct 2006
Posts: 3
12-02-2006 05:36
This is just a minor modification of what Osgeld Barmy posted before. I'm just changing llSetAlpha(0.0, ALL_SIDES); to llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);

My understanding is that this changes the alpha of the whole linked set to 0, instead of just the one one object that the script is in. I've been going through the forums here and reading the wiki, but I'm guessing that there's something really simple that I'm missing?


default
{
state_entry()
{
llListen(90, "", NULL_KEY, "";);
}

listen(integer channel, string name, key id, string message)
{
if (message == "show";) llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES);
else if (message == "hide";) llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);
else return;
}
}
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-02-2006 05:58
From: Charron Marseille
This is just a minor modification of what Osgeld Barmy posted before. I'm just changing llSetAlpha(0.0, ALL_SIDES); to llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);

My understanding is that this changes the alpha of the whole linked set to 0, instead of just the one one object that the script is in. I've been going through the forums here and reading the wiki, but I'm guessing that there's something really simple that I'm missing?


default
{
state_entry()
{
llListen(90, "", NULL_KEY, "";);
}

listen(integer channel, string name, key id, string message)
{
if (message == "show";) llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES);
else if (message == "hide";) llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);
else return;
}
}


Yes that will work fine.
Personally I'd add specific listens but thats pretty minor
CODE
default
{
state_entry()
{
llListen(90, "", NULL_KEY, "show");
llListen(90, "", NULL_KEY, "hide");
}

listen(integer channel, string name, key id, string message)
{
if ("show" == message) llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES);
else if ("hide" == message ) llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);
}
}
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
12-02-2006 08:06
From: Newgate Ludd
Yes that will work fine.
Personally I'd add specific listens but thats pretty minor
CODE
default
{
state_entry()
{
llListen(90, "", NULL_KEY, "show");
llListen(90, "", NULL_KEY, "hide");
}

listen(integer channel, string name, key id, string message)
{
if ("show" == message) llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES);
else if ("hide" == message ) llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);
}
}

Extra listens == bad. :(
_____________________
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-02-2006 09:06
From: Tyken Hightower
Extra listens == bad.


There seems to be conflicting information concerning that statement.
One camp have said its better as you have pre filtered and the others say its more laggy.
Anyone got any conclusive figures?
And if its that bad why has support for keyword been retained and not dropped?
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
12-02-2006 10:56
From: Newgate Ludd
There seems to be conflicting information concerning that statement.
One camp have said its better as you have pre filtered and the others say its more laggy.
Anyone got any conclusive figures?
And if its that bad why has support for keyword been retained and not dropped?

More listens will actually slow your script down, filtered or not. Doesn't even mean it necessarily slows the sim down, but for some reason it specifically cuts your script's performance.
_____________________
Charron Marseille
Registered User
Join date: 10 Oct 2006
Posts: 3
12-02-2006 13:19
Hrm. The odd thing is that I have that in a 3 prim pose stand, and it doesn't work...
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-02-2006 15:02
From: Tyken Hightower
More listens will actually slow your script down, filtered or not. Doesn't even mean it necessarily slows the sim down, but for some reason it specifically cuts your script's performance.


Well I can see both sides of the arguement but have never bothered looking for concrete proof either way.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-02-2006 15:03
From: Charron Marseille
Hrm. The odd thing is that I have that in a 3 prim pose stand, and it doesn't work...



Are there any other scripts runnign at the time that may be explicitly overriding the hide?
Charron Marseille
Registered User
Join date: 10 Oct 2006
Posts: 3
12-02-2006 18:44
I figured it out. The running box was unchecked. I knew it was something simple and obvious. Thanks for your help everyone!
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-03-2006 12:02
From: Charron Marseille
I figured it out. The running box was unchecked. I knew it was something simple and obvious. Thanks for your help everyone!


Its always the really obvious things that trip us up!
you will probably find that the script had previously failed to compilel so the running box had automatically been unchecked.