Tinker Darkbyrd Posted December 23, 2015 Share Posted December 23, 2015 Not sure if my title explains my issue correct,but here is what I need help with.(if any kind soul is willing to offer any :) )I have a animation system in a HUD im building.It works off a list and should play the animations in the order of the list with 90 seconds between each animation.list mehAni = ["ani1","ani2","ani3","ani4"];the function I madePlay(){integer number = llGetListLength(mehAni);integer index;string name = llList2String(mehAni, index);while (index < number){llMessageLinked(1,15,"We will now do the "+name+" pose for 90 seconds.","");llStartAnimation(name);++index;}} I have a timer that will trigger the function at 90 seconds and works fine on the first aniamtion, after that one it loops threw the list super fast with out playing any one the animations only announcing the animations "should" be playing ...but they are not ..it just spits out a list of animation names with out playing them.The timer part im not worried about its how it is indexing the list loop that im having a issue with.it should play each animation for 90 seconds. Link to comment Share on other sites More sharing options...
Sassy Romano Posted December 23, 2015 Share Posted December 23, 2015 That's not going to work for a start because you're resetting variables each time you enter the function. There's more to the problem, whole script please. Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 23, 2015 Share Posted December 23, 2015 The way to approach that problem is to ditch your user defined function and build its guts into your timer event. Use a global integer variable as a counter that updates each time that the event triggers, and then use its value to grab the next animation from your mehAni list. llStartAnimation(llList2String(mehAni,(++gCount)%llGetListLength(mehAni)); Link to comment Share on other sites More sharing options...
Xiija Posted December 24, 2015 Share Posted December 24, 2015 also, dont forget to llStopAnimation(); before starting a new one. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now