Something i doing wrong with that script:( i have 8 linked object and want animate with alpha script only 4 from them with names "obj1", "obj2", "obj3" and "obj4". I need first visible "obj1" then it will alpha and "obj2" will visible and etc. I removed from script only:
touch_start(integer num) // In which you turn animation On/Off { llSetTimerEvent(animation_speed* (gON = !gON)); link_counter = 0;
because i don't need to touch object. i will wear it.
i get this:
float animation_speed = 0.5; integer link_counter; list gModel_list=["obj1", "obj2", "obj3", "obj4"]; // List of your animated link numbers integer gLen; // Length of gModel_list
default { state_entry() // In which you make a list of the links to be animated { integer i = llGetNumberOfPrims(); while (i) { if (llGetLinkName(i) == "obj1") // Find the links named "Model" { gModel_list += ; // Add them to a list } --i; } gLen = llGetListLength(gModel_list); // How long is the list? }
changed( integer c) { if ( c & CHANGED_LINK) { llResetScript(); } } timer() // In which you animate the links { link_counter = (++link_counter)%gLen; // Choose the next link in gModel_list, a new one each time the timer fires integer i; while ( i < gLen) // Step through all links listed in gModel_list { integer Link = llList2Integer(gModel_list,i); // Get the link number if ( i == link_counter) // If this link is the one chosen ..... { llSetLinkAlpha(Link, 1.0, ALL_SIDES); // ... make it visible } else { llSetLinkAlpha( Link,0.0, ALL_SIDES); /// .... make it transparent } ++i; } } }
i don't get error but script not work. Could you please write where i was wrong?