Heratiki Turnbull
Juggalo Ninja Master
Join date: 2 Mar 2005
Posts: 81
|
05-16-2005 08:11
Basically what I want to do is change the color on the outside of a prim (TEXTURED) in a wave instead of direct change... Basically using llSetColor() to do it now and it works ok in my timer event but the timer event really doesn't stay static with it's timing so when I have two objects that should have to sync up they eventually grow further apart or right at the start aren't displaying the same like colors... Basically think of a Rainbow and how it fades from one color to the next... I'm attempting that and then back again so there is a steady ping pong loop from one color to the next instead of a harsh WHAM of color...
TIA for any responses...
Heratiki Turnbull
|
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
|
05-16-2005 08:25
A vector gradient can be performed fairly easily:
vector color1; vector color2; float pos = 0.5; //(0 to 1.0 == color1 to color2)
vector color = ((1 - pos) * color1) + (pos * color2);
|
Heratiki Turnbull
Juggalo Ninja Master
Join date: 2 Mar 2005
Posts: 81
|
05-16-2005 10:29
And then just pass the vector color over to the llSetColor()??? I'm assuming... But assumption always gets me in the end...
I'm also trying to figure out how I would be able to sync up two seperate Prims (Not Linked)... If anyone has any thoughts... Thank you Adam I'll be sure and implement that into my script... You wouldn't believe what my script looks like... LOL... Let's just say that it has 7 Seperate loops to go from Red to Orange to Yellow to Green to Blue to Indigo to Violet... I hope this is basically what I'm attempting... Thanx again...
Heratiki
|
Jon Marlin
Builder, Coder, RL & SL
Join date: 10 Mar 2005
Posts: 297
|
05-16-2005 11:11
The simplest way, if they're not linked, would be to use a non-zero channel whisper, say, or shout (depending on the distance). Have the timer in one, and when it goes off, tell the other one using the appropriate chat message.
There would probably be an time offset, but it should be relatively fixed length, so you could compensate for it.
Alternately, you could set up a sort of key frame system, where you run the timers independently in each prim, but sync up once every couple seconds using chat messages.
- Jon
|
Zalandria Zaius
Registered User
Join date: 17 Jan 2004
Posts: 277
|
1.7
05-16-2005 11:53
I've heard rumor, object to object communication may be in 1.7.. (crosses fingers)
If so this will solve a lot of woes.. or create new ones depending on how they implement it.
Let's just hope 1.6.5 will go smoothly and they can get onto the next one quickly
|
Heratiki Turnbull
Juggalo Ninja Master
Join date: 2 Mar 2005
Posts: 81
|
05-17-2005 09:38
Amen to that... LOL... Thank you all for the help I think I'll take the path of least resistance and go with a whisper event between the two on a non zero channel and have it set the color accordingly but with only one of the objects actually containing the base code... Thanx again everyone...
Heratiki
|