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);
}
}
}