Hello, I'm working on an object and trying to get two child prims (eyes) to blink using a texture changing script. I tried putting the script in both child prims and it worked, but they weren't in sync (due to the randomness of the blinking).
My idea on solving that would be to modify the script to modify both child prims at the same time and place the script in the root prim. How can I modify this section to work on two linked prims? I'm sharing the section for context, but I really just need to know how to modify llSetTexture to the correct function.
default
{
on_rez(integer startparam)
{
llResetScript();
}
state_entry()
{
llSetTexture(OPEN, ALL_SIDES); // open
llSetTimerEvent(llFrand(3) + 3);
}
timer()
{
llSetTexture(CLOSED, ALL_SIDES); // closed
llSleep(llFrand(0.2) + .1); // sometimes blink a little faster, from 0.2 to 0.3
llSetTexture(OPEN, ALL_SIDES); // open
llSetTimerEvent(llFrand(3) + 3); // make them blink randomly
}