Hiya, I've made a mesh head with 5 eyelid faces or states, as well as the jaw, seamlessly laid on top of each other. As such: I moved the eyes forward to show what I mean. I copied a script from another source, that involves clicking on the eyelids/jaw and making it cycle trough transparencies of each frame and loop. I wouldn't know even where to begin looking for an advanced script with blinking + HUD attatchments for face states, I tried looking but it looks like I'd need to commission an actual scripter to do it for me. So for now I opted for a simple click script, merely to test things out as the head is nearly completed, and here's the text; integer direction;
integer value;
integer previousvalue;
facetrigger()
{
previousvalue = value;
value += direction;
if (value = 0) direction = 1;
if (value = 4) direction = -1;
llSetText("Showing face " + (string)value, <1,1,1>, 1);
//show next part/face
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_COLOR, value, <1,1,1>, 1]);
//hide previous part/face
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_COLOR, previousvalue, <1,1,1>, 0]);
}
default
{
state_entry()
{
direction=0;
value=4;
}
touch_start (integer total_number) {
facetrigger();
}
}It just so happens that only the first frame moves, from frame 5 (which is completely closed) to frame 4 (almost closed), and then it gets stuck. I tried putting in values from 1 to 5, but it seems like the code fails to loop, it gets stuck somewhere, I just don't understand where, so I was hoping for some insight? Thank you.