Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Scriptus Botanicae

Rudolf Cleanslate
Registered User
Join date: 1 Dec 2006
Posts: 13
05-01-2009 09:56
Yep, this is a script for plants...

Most plant textures look much better when set full bright, but will make make your plant glow in the dark.

This script will turn on fullbright at daytime, throw an orange tint over the texture at dusk and dawn, and a grey tint at nighttime which gives your garden an eerie look in the dark.

I have added a little physics which makes it bit more difficult to walk through the foliage.

vector time = <0,0,0>;
default
{

state_entry()
{
llSetTimerEvent(60.0);
}
collision_start(integer num)
{
llTriggerSound("c94528a9-9a54-e63f-fe2d-763db653bbda",1);
llSleep(3.0);
llSetLinkPrimitiveParams(LINK_SET,[PRIM_PHANTOM,TRUE]);
}
timer()
{
time = llGetSunDirection();
//llOwnerSay((string) time.z);
llPreloadSound("c94528a9-9a54-e63f-fe2d-763db653bbda";);
llSetLinkPrimitiveParams(LINK_SET,[PRIM_PHANTOM,FALSE]);
if ((time.z > 0.15) )
{
llSetLinkColor(LINK_SET, <1, 1, 1>, ALL_SIDES);
llSetLinkPrimitiveParams(LINK_SET,[PRIM_FULLBRIGHT,ALL_SIDES,TRUE]);
}
else if ((time.z < 0.15))
{
llSetLinkPrimitiveParams(LINK_SET,[PRIM_FULLBRIGHT,ALL_SIDES,FALSE]);
}
if ((time.z >= -0.10) && (time.z <= 0.10) )
{
llSetLinkColor(LINK_SET, <1.0,(((time.z+0.1)*2)+0.6), (((time.z+0.1)*4)+0.2)>, ALL_SIDES);
}
if ((time.z < -0.15) )
{
float drk = (-0.15/time.z)-0.2;
llSetLinkColor(LINK_SET, <0.5, 0.5, 0.5>, ALL_SIDES);
}
}
}
Kris Seoung
Registered User
Join date: 27 Aug 2008
Posts: 7
05-01-2009 18:52
Nice, and sublime... What is the licensing?
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
05-02-2009 00:32
nice!