Jump to content

multiple animations in 1 prim


Summer Logan
 Share

You are about to reply to a thread that has been inactive for 4244 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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

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

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

You are about to reply to a thread that has been inactive for 4244 days.

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
 Share

×
×
  • Create New...