Jump to content

Animation script


JackRipper666
 Share

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

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

Recommended Posts

Hey guys, I'm trying to figure out how to start and stop an animation I have that runs in a loop. I want to start it with something like touch start once I touch it the animations plays the loop but if I touch the cube again it stops the animation. And I need the script to repeat that process so that if I touch it a third time it runs the loop animation again. Can anyone help me out? lol

Link to comment
Share on other sites

integer i;default{    touch_start(integer total_number)    {        if (i=~i)        {            // play your animation here and do whatever other stuff when touched        }        else        {            // stop your animation here and do whatever other stuff when stopped        }    }}

 You'll need to add the other bits in, If you need a nudge as to where to look, you need to look at llStartAnimation and llStopAnimation

If you read around llStartAnimation, you'll see that you will need to also first request permissions to animate and you'll find referenced off llStartAnimation wiki page.  Come back if you need more help.

I should add that this will also depend on whether the animation itself is looped or not.  If the animation is looped then the above is sufficient but if the animation is not looped, then you'll need to include something like a timer to start it again when it finishes.  (Easier to use a looped animation in this case).

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3801 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...