First, I noticed he was using 100’s of continuous color changing scripts for the lights.
Worse yet he linked the lights together and this causes SL to send updates for the whole set.
I had him apply the free rainbow texture and this script.
I have a few problems.
1. I can’t keep the lights in sequence. Each time someone logs in they are out of sequence for that person. I added a “Touch here box” but It would be better to have it update every 10 seconds or so.
2. I can’t get llOffsetTexture() to have any effect other to clear it to zero. It appears that the ANIM_ON, starts at zero if the texture offset has been modified.
I am looking for a way to set the animation to a specific start phase without having to stop it. The code below is close, but not perfect.
CODE
// anim SMOOTH Script
// By Doug Linden (I think)
// Updated by grumble Loudon, for rainbow texture
float m_Phase = 0;
AnimStart(){
// llSetTextureAnim() is a function that animates a texture on a face.
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 127,1, 0, 0, 10);
// animate the script to scroll across all the faces.
}
AnimStop(){
llSetTextureAnim(0, ALL_SIDES, 127, 1, 0, 0, 10);
}
default
{
// state_entry() is an event handler, it executes
// whenever a state is entered.
state_entry()
{
AnimStart();
llListen(9, "", NULL_KEY, "sync") ;
}
listen(integer channel, string name, key id, string message){
llSleep(m_Phase);
AnimStop();
llOffsetTexture(0, 0, ALL_SIDES);
AnimStart();
}
}