Eve Cartier
SL Hermit
Join date: 25 Nov 2002
Posts: 79
|
10-21-2005 17:24
I have hunted high and low for two scripts, and can't find them. Mind you, I believe them to be out there, I'm just not entirely sure where to find them.
First, I need a script that causes one texture to show up during the day, and another texture to show up at night. It would be even better if this texture would show up only one one side of the prim, but I'll take what I can get.
Second, I need a script that causes a pre-set sentence to appear when you pass through a phantom prim. To better explain, imagine a phantom prim set in front of your door that "says" "Welcome to my home" when someone walks through your door.
Does anyone have ANY clue where I can find either/both?
|
cua Curie
secondlifes.com/*****
Join date: 14 Nov 2003
Posts: 196
|
10-21-2005 17:43
Here is a basic script for the day / night texture part. //day / night script by cua Curie //use it however ya like
key DayTexture="";//put the key of the day time texture here key NightTexture="";//putr the key of the night texture here integer side=1;//sets the side of the prim you want to change, use ALL_SIDES to change the entir prim
check() { vector sun_dir = llGetSunDirection();//gets the sun direction if (sun_dir.z > 0 && llGetTexture(1)==NightTexture) //a positive value for sun_dir.z means its daytime { llSetTexture(DayTexture,1);//set the day texture } else if (sun_dir.z < 0 && llGetTexture(1)==DayTexture) //a negative value for sun_dir.z means its nighttime { llSetTexture(NightTexture,1); } llSetTimerEvent(120); }
default { state_entry() { check();//this calls the function to check the day / night status } timer() { check();//this calls the function to check the day / night status } }
|
cua Curie
secondlifes.com/*****
Join date: 14 Nov 2003
Posts: 196
|
10-21-2005 17:50
Here is the other half of your request default { state_entry() { llVolumeDetect(TRUE); }
collision_end(integer num) { llSay(0,"Welcome to my home"); } }
|
Bobby Riva
Registered User
Join date: 16 Jun 2005
Posts: 7
|
Question
10-22-2005 04:19
Hi cua
I'm just wondering what purpose the "&& llGetTexture(1)==NightTexture" serves?
Thanks Bobby
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
10-22-2005 09:24
From: Bobby Riva Hi cua I'm just wondering what purpose the "&& llGetTexture(1)==NightTexture" serves? Thanks Bobby Those prevent it from repeatedly changing the texture all day/night. In other words, only change the texture if (a) it's daylight and (b) if the texture is the night texture.
|