Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Can You Help?

Lou Hoodoo
My <3 Beats 4 Boo Hoodoo
Join date: 5 Jan 2005
Posts: 25
03-14-2005 07:58
Hi, I'm fairly new to SL and haven't gotten into scripting yet. I started building first, but need a few scripts, cheap or free. If you can help with any of the following scripts, plz let me know.


* Faucet and knobs with running water
* Both horizontal & vertical doors with vertical having an "allowed to lock/unlock" list (garage door and standard door)
* Weather for my land with rain/snow
* Moving fire (like a fireplace)
* Toilet flush with sound
* Any other cool scripts that'll help me build. I'm going to specialize in bathroom and kitchen furniture. (Maybe bedroom too.)
Jack Lambert
Registered User
Join date: 4 Jun 2004
Posts: 265
03-14-2005 13:16
I'll take a stab at the faucet at least...

Have a prim with a water texture, basically a cylinder, with a script in it...

CODE

default
{
state_entry()
{
llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); // Just in case
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0, 0, 0.5);
}

link_message(integer iSender, integer iNum, string sStr, key kId)
{
if (sStr == "on")
{
llSetAlpha(1.0, ALL_SIDES);
}
if (sStr == "off")
{
llSetAlpha(0.0, ALL_SIDES);
}
}
}


in the faucet prim(s), put this in:

CODE

integer on = TRUE;

default
{
touch_start(integer iNum)
{
if (!on) llMessageLinked(LINK_SET, 0, "on", NULL_KEY);
else llMessageLinked(LINK_SET, 0, "off", NULL_KEY);
on = !on;
}
}


That should work. Be sure and link the water first, then the faucet. Touch the faucet to turn the water off and on (basically just setting it alpha or not).

--Jack Lambert
_____________________
----------------------------
Taunt you with a tree filled lot? hahahahahahaha. Griefer trees! Good lord you're a drama queen. Poor poor put upon you.

-Chip Midnight
Jack Lambert
Registered User
Join date: 4 Jun 2004
Posts: 265
03-14-2005 13:23
Incidentally, I think there's "fire" in the library? If not, gis a shout in game and I'll send you one.

--Jack Lambert
_____________________
----------------------------
Taunt you with a tree filled lot? hahahahahahaha. Griefer trees! Good lord you're a drama queen. Poor poor put upon you.

-Chip Midnight
Lou Hoodoo
My <3 Beats 4 Boo Hoodoo
Join date: 5 Jan 2005
Posts: 25
Can You Help?
03-14-2005 15:28
Thx for the posts. I'll try the faucet later when I log on. Let you know if it works.