Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

~Script Help Needed~

ZsuZsanna Raven
~:+: Supah Kitteh :+:~
Join date: 19 Dec 2004
Posts: 2,361
09-08-2005 09:04
Hello I am in need of 2 different scripts. I need a door script that when you touch it, it opens then closes. I also need a window script that will darken and lighten windows via a chat command. I have no clue how to script so if someone has something like this for sale please let me know. Thanks!
_____________________
~Mewz!~ :p
a lost user
Join date: ?
Posts: ?
09-08-2005 13:28
Hrmmm.. should be able to get the door one from one of the junkyards, like Yadni's Junkyard. There's a free one released/created by Bill Linden I believe. It doesn't automatically close, so you either have to click to open and then click to close, or modify the script. Either way, it's in the game somewhere and fairly easy to come by.

The window tinting system is also fairly easy, not sure if there is one specificially designed for your needs of course, as everyone seems to have a slightly different variant on the same thing.. in scripting there are many more ways to skin a cat, so to speak.

Here's a script you can place in a prim for the window tinting switch:
CODE
integer input = 2001;
integer output = 2002;
integer listening;

start_listen(key id)
{
if(listening) llListenRemove(listening);
listening = llListen(input,"",id,"");
}

default
{
touch_start(integer num)
{
llDialog(llDetectedKey(0),"Select Transparency",["0","50","100"],input);
start_listen(llDetectedKey(0));
}

listen(integer channel, string name, key id, string message)
{
llListenRemove(listening);
llShout(output,message);
}
}


And here is the one to put in the windows:
CODE
integer input = 2002;

start_listen()
{
if(listening) llListenRemove(listening);
listening = llListen(input,"","","");
}

default
{
on_rez(integer p)
{
llResetScript();
}

state_entry()
{
start_listen();
}

listen(integer channel, string name, key id, string message)
{
llSetLinkAlpha(llGetLinkNumber(),(integer)message,ALL_SIDES);
}
}
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
09-08-2005 13:48
Aha. Now I get a chance to nitpick :)

CODE

llSetLinkAlpha(llGetLinkNumber(),(( (float) message ) / 100), ALL_SIDES);


:)
Dianne Mechanique
Back from the Dead
Join date: 28 Mar 2005
Posts: 2,648
09-08-2005 13:53
From: ZsuZsanna Raven
Hello I am in need of 2 different scripts. I need a door script that when you touch it, it opens then closes. I also need a window script that will darken and lighten windows via a chat command. I have no clue how to script so if someone has something like this for sale please let me know. Thanks!
There is an open source door script that does everything you want, (even the auto close part). I am at work right now but if you dont have it by this evening, give me an IM in world after 5:00 and I will drop it on you. :)
_____________________
.
black
art furniture & classic clothing
===================
Black in Neufreistadt
Black @ ONE
Black @ www.SLBoutique.com


.
a lost user
Join date: ?
Posts: ?
09-08-2005 14:10
ahh yes.. My bad :P I just woke up so I wasn't thinking :p