Summer Logan Posted September 9, 2012 Share Posted September 9, 2012 Hello Everyone,I'm a noob at scripting so needing a little help...I have about 5 animations that I want to play in a certain order and then stop when finished.I'm thinking I have to llsettimer? Or something. It's been a long long long time since I've messed with scripting so if anyone would like to post here or donate some time in SL to show me a couple things I'd be greatly appreciated... Thanks a bunch,Summer Logan Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 10, 2012 Share Posted September 10, 2012 Yes, you could trigger them one after another with a timer event. That's likely to be less successful than you'd want unless the animations each take exactly the same amount of time to run, so I suggest timing them each first. Then you can reset the duration of the timer each time you enter the event. Something like ... list gTimes = [1.2, 5.6, 1.8,3.7,4.2]; //global variablelist gAnims = ["anim 1", "anim 2", "anim 3", "anim 4", "anim 5"]; //global variableinteger gNum; //global variablestring gCurrentAnim; // global variable....llSetTimerEvent(1.2);llStartAnimation("anim 1");gCurrentAnim = "anim 1";gNum = 0;....timer(){ gNum = (gNum + 1)%5; llSetTimerEvent(llList2Float(gTimes,gNum)); llStopAnimation(gCurrentAnim); gCurrentAnim = llList2String(gAnims,gNum); llStartAnimation(gCurrentAnim);} That will keep triggering the animatiuons in sequence, around and around. If you provide a way to stop the timer, you can let it run only a fixed number of times before ending. Link to comment Share on other sites More sharing options...
Summer Logan Posted September 10, 2012 Author Share Posted September 10, 2012 Thank You Rolig Loon, I tried putting together a sample of what you gave me and got a syntax error at llSetTimerEven(1.2); The error is after the opening ( and before the 1... Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 10, 2012 Share Posted September 10, 2012 You know that wasn't a complete script, right? I was just outlining the part that you asked about so you could see how to change the duration of the timer with each iteration. That syntax error is simple, though. You misspelled llSetTimerEvent. Link to comment Share on other sites More sharing options...
Summer Logan Posted September 10, 2012 Author Share Posted September 10, 2012 I didn't misspell it I even copy pasted what you wrote and still got the error. I understand it wasn't a full script but I will still trying to see if I could get that at least saved and working to see if it was going to work the way I was expecting. Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 10, 2012 Share Posted September 10, 2012 Yeah, but you won't get that code to compile. The parts where I left [ .....] are chunks of missing code that are left as a homework exercise. Without them, you can't test it. The misspelling was in your last post, BTW. That's why I assumed there must have been one in your own code. 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