Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Window Tint System

Ethan Habsburg
Shop Keeper
Join date: 2 Jan 2006
Posts: 98
11-27-2007 07:48
I use this freebee window tint system. However it has a limited control distance of about 30m. Is there any way to boost the distance that the switch can control the window?
Thanks,
Ethan

below goes in box





integer menu_handler;
integer menu_channel;
menu(key user,string title,list buttons)
{
menu_channel = -37641 ; // You can change the Channel as needed...to add more systems into one house, but dont forget to change the channels in the Window (Target) Scriot too)
menu_handler = llListen(menu_channel,"","","";);
llDialog(user,title,buttons,menu_channel);
llSetTimerEvent(5.0);
}

default
{
touch_start(integer t)
{
menu(llDetectedKey(0),"Window Tinting System",["100","80","60","40","20","0"]);
}
timer()
{
llSetTimerEvent(0.0);
llListenRemove(menu_handler);
}
listen(integer channel,string name,key id,string message)
{
if (channel == menu_channel)
{
llSetTimerEvent(0.0);
llListenRemove(menu_handler);
if(message == "100";)
{
llSay(menu_channel,"100";);
}
else if(message == "80";)
{
llSay(menu_channel,"80";);
}
else if(message == "60";)
{
llSay(menu_channel,"60";);
}
else if(message == "40";)
{
llSay(menu_channel,"40";);
}
else if(message == "20";)
{
llSay(menu_channel,"20";);
}
else if(message == "0";)
{
llSay(menu_channel,"0";);
}
}
}
}



below goes in window




default
{
state_entry()
{
llListen( -37641, "", NULL_KEY, "" );
}

listen( integer channel, string name, key id, string message )
{
if ( message == "100" )
{
llSetAlpha(1.0, ALL_SIDES);
}
else if ( message == "80" )
{
llSetAlpha(0.8, ALL_SIDES);
}
else if ( message == "60" )
{
llSetAlpha(0.6, ALL_SIDES);
}
else if ( message == "40" )
{
llSetAlpha(0.4, ALL_SIDES);
}
else if ( message == "20" )
{
llSetAlpha(0.2, ALL_SIDES);
}
else if ( message == "0" )
{
llSetAlpha(0.0, ALL_SIDES);
}
}
}
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
11-27-2007 08:07
switch all instances of "llSay(menu_channel," to either "llShout(menu_channel," for 100 meter range or "llRegionSay(menu_channel," to control windows anywhere in the sim.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Usagi Musashi
UM ™®
Join date: 24 Oct 2004
Posts: 6,083
11-27-2007 08:14
Again jesse you did it again! thank you!
Ethan Habsburg
Shop Keeper
Join date: 2 Jan 2006
Posts: 98
11-27-2007 10:12
thank you Jesse for such a fast response!!!!
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
11-27-2007 11:49
From: Ethan Habsburg
thank you Jesse for such a fast response!!!!

The one that should be thanked was the creator of that script. OMG I can't remember who it was, but I have a copy of the same script in my possession and still use it sometimes. It is an easy script to play with when learning LSL & shows the basics of llDialog, llSay, importance of different channels, timer events & removing listens. You can use it as a basis for a texture changing script and a few others. So many example scripts around from so many generous people but this one is a true classic.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum