Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Texture on Demand

TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
07-18-2005 12:14
Hi all. Yea its me agine with another scripting problem.
I am currently trying to make or find a script that on a given text command will change to a given texture set to a given transparency color repeats and animateion
I tryed to work with the "show and hide" texture in the inventory libary but I kept getting an error.

This is for my arched celing at my place.

need sumthing like:

Text command <window>
Texture <blank>
Transparancy <54>
Animation <0>
Texture Repeat <1,1>
Color <0,0,154>

Text command <stars>
Texture <stars>
Transparancy <0>
Animation <0.05>
Texture Repeat <10,10>
Color <0,0,0>

Text command <sky>
Texture <sky>
Transparancy <0>
Animation <0.1>
Texture Repeat <1,1>
Color <0,0,0>

Text command <shields>
Texture <metal03>
Transparancy <0>
Animation <0>
Texture Repeat <1,1>
Color <0,0,0>
_____________________
Drunken Monkeys danceing on the tables.
Falling from the sky just like in a fable.
Synergy Belvedere
Prim Reaper
Join date: 7 Jul 2004
Posts: 253
07-18-2005 12:41
CODE

default
{
state_entry()
{
llListen(5,"",llGetOwner(),"");
}
listen(integer chan, string name, key id, string msg)
{
if(msg=="window")
{
llSetTexture("blank",ALL_SIDES);
llSetAlpha(0.0,ALL_SIDES);
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0, 0, 0.5); //this may not work as expected
llScaleTexture(1,1, ALL_SIDES);
llSetColor(<0,0,.5>,ALL_SIDES); //set color works on a 0 to 1 RGB basis, not 0 to 255
}
if(msg=="stars")
{
//see above but change texture name, coords, etc
}
//etcetera for other settings

}
}


simply type " /5 window " or " /5 stars " to change it to what you want. You'll need to have the textures you're trying to display in the prims inventory as well, named exactly like they are mentioned in the code.
_____________________
----------------------------------------------------------
--The mind's eye is limited only by its focus--
TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
07-18-2005 12:48
ahh ty dident expect a reply so soon...
well now its just a waiting game till I get off work to test and apply this
_____________________
Drunken Monkeys danceing on the tables.
Falling from the sky just like in a fable.