|
Okiphia Rayna
DemonEye Benefactor
Join date: 22 Sep 2007
Posts: 2,103
|
10-08-2007 12:26
I have a fountain with multiple prims that are all water... but I want the water to change colour, in sync, same color same time. I have a color changing script, but when i try to apply that to all of them while linked, only the main one (Dunno the term, the yellow outlined in linked) changes colours, and if I apply to all of them, they all go to random colors, not the same.
Can anyone help me out? It's probably simple, but I only know basic scripting... Thank you for the small chunk of your time it took to read this o.o
|
|
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
|
10-08-2007 13:11
There are a numerous solutions to this, depending on various factors and context. The following example solution generates a random colour every 5 seconds, and changes all sides of every prim in the set to the colour so generated. Likely in an object like a fountain you'll not want to change the colour of *every* prim within the set, but only specific prims. For this you'll need to consider the 'linknumber' parameter of the llSetLinkColour function or even llMessgeLinked. See the wiki pages here for details about how to do this: http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSetLinkColor & http://www.lslwiki.net/lslwiki/wakka.php?wakka=llmessagelinkedHope this "small chunk of time" helped  [/php] vector Colour = <0.0,0.0,0.0>; ColourChanger() { Colour.x = llFrand(1.0); Colour.y = llFrand(1.0); Colour.z = llFrand(1.0); llSetLinkColor(LINK_SET,Colour,ALL_SIDES); } default { on_rez(integer StartParm) { llResetScript(); } state_entry() { llSetTimerEvent(5.0); } timer() { ColourChanger(); } }
|
|
Okiphia Rayna
DemonEye Benefactor
Join date: 22 Sep 2007
Posts: 2,103
|
10-08-2007 18:06
Actually, thats exactly what i wanted, the whole set, as I have the water and fountain itself seperate, since I will probably change the design often ^^
Thanks a ton!
|