These forums are CLOSED. Please visit the new forums HERE
Creating a stop all animation script |
|
|
Mondego Voom
Registered User
Join date: 23 May 2007
Posts: 4
|
06-25-2007 07:31
What is used to create a stop all animation script? I searched the wiki and found nothing. Is it customary to first start an animation then immediately stop it?
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
06-25-2007 08:14
Hard to say what is customary . . . but I think most scripts that start an animation will also provide a means for ending it.
And, there is an option from the menus to stop all animations. You could also do that via script, but there is not a "necessity" for it. Not entirely sure if that answers your question . . . Baron |
|
Mondego Voom
Registered User
Join date: 23 May 2007
Posts: 4
|
06-25-2007 08:27
Not really. I'm creating my own vending system. And I wish to make an object that users can click to stop animations.
|
|
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
|
06-25-2007 08:29
The script can call llGetAnimationList
to get a list of all animations the AV is currently running. Then it can call llStopAnimation on each of them. Note if you leave them with NO animations running at the end of all this, you might notice some weird behavior - since apparently SOME animation has to be running all the time ("stand" seems to be the default - so you might want to start that one if you stop all the others.) Also make sure to check llRequestPermissions and its PERMISSION_TRIGGER_ANIMATION option, since you'll need those perms to manipulate an AVs animations. |
|
Mondego Voom
Registered User
Join date: 23 May 2007
Posts: 4
|
06-25-2007 08:37
Yeah I tried llGetAnimationList, but as I experienced, and as the wiki states:
http://wiki.secondlife.com/wiki/LlGetAnimationList "Caveats * There is no way to get the name of the animations playing. " |
|
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
|
06-25-2007 09:00
It returns the keys of the animations, not the names. But if all you want to do is stop the animations being played, all you need is to pass each key to llStopAnimation.
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
06-25-2007 12:42
|
|
Mondego Voom
Registered User
Join date: 23 May 2007
Posts: 4
|
06-26-2007 09:57
Hah, so it turns out I had written a properly working script prior to creating this thread but hadn't tested it with an animation running. Thanks for all of the help though!
|