JackRipper666 Posted October 31, 2013 Share Posted October 31, 2013 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 More sharing options...
Sassy Romano Posted October 31, 2013 Share Posted October 31, 2013 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). 1 Link to comment Share on other sites More sharing options...
JackRipper666 Posted October 31, 2013 Author Share Posted October 31, 2013 Ah great! Thanks this will work well! 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