llStopAnimation
|
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
11-09-2007 13:47
I know it is probably something simple I am missing but llStopAnimation does not appear to be working. As a test I added this routine to the script and the animation still did not stop.
llStop_Anim(){ llOwnerSay((string)av); list animas = llGetAnimationList(av); integer t = llGetListLength(animas); integer n; for(n=0;n<t;n++){ llOwnerSay("#"+(string)n); llStopAnimation(llList2String(animas,n)); } }
The av key showed up, then "#0 + the name of the animation, but the animation did not stop. Can anyone tell me what I have done wrong?
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
11-09-2007 13:52
Try llStopAnimation((key)llList2String(animas,n));
If that doesn't work, you might try looking at whether the script has the right permissions when it triggers that function, though you would probably get a script error message if that was the case.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal
http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
|
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
Nope
11-09-2007 14:10
That did not work either. It has permission or the animation would not have started and there is no error message. I am baffled.
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
11-09-2007 15:10
Hm. I can't see anything specifically wrong with that function. I think I would have to see a bit more of the script. Unless anyone has noticed anything that I have missed... (assuming "av" is the correct key for the avatar, and is a global).
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal
http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
11-09-2007 15:41
I don't see anything obvious, but I have seen on occasion where animation functions failed silently if you didn't request permission just before executing them. Try this:
llStop_Anim(){ llOwnerSay((string)av); list animas = llGetAnimationList(av); integer t = llGetListLength(animas); integer n; for(n=0;n<t;n++){ llOwnerSay("#"+(string)n); llRequestPermissions(av,PERMISSION_TRIGGER_ANIMATION); llStopAnimation(llList2String(animas,n)); } }
|
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
11-09-2007 17:34
I had a similar problem recently with a script. It's a simple animated pose ball. When an avatar sits, permission is acquired and the animation starts. I can then trigger llStopAnimation(<name_of_animation>  10 seconds later... yet the animation does not stop. Oddly, however, if the avatar then types... the animation will stop and the typing animation will start. The typing animation leaves the avatar in a funky pose though. Thinking back on it, I wonder if it's all because I stop the default "sit" animation when an avatar sits. Without that base animation playing, and once the current animation is "stopped," the avatar is left with NO animation to play. Maybe that's not possible, so the last animation continues to play, despite having been "stopped".
|
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
Final solution
11-09-2007 17:44
I was finally able to stop the animation by starting a sit and then stop that. Go figure.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-09-2007 18:33
From: Mod Faulkner I was finally able to stop the animation by starting a sit and then stop that. Go figure. Then that should indicate that it isn't working it way through the list correctly. Try this: for(n=0;n<t;n++){ //llOwnerSay("#"+(string)n);You already know that this works llStopAnimation(llList2String(animas,n)); llOwnerSay(llList2String(animas,n));
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|