|
Lost Oddfellow
Registered User
Join date: 15 Sep 2005
Posts: 33
|
11-19-2006 14:55
I've been trying for a while now, but I can't seem to find a simple way to get a script to play an animation on once. I've built a little hud with buttons on and I would like each one to play a diffrent animation Once and only Once when pressed. the trouble is llStartAnimation loops the animation and they need to be stoped with llStopAnimation. I would have no trouble with that, but there is no way I can see to check what the length of the animation is with a script, or even by checking the animation properties itself. so the only option I can see would be to adjust the script to every single animation idavidualy througha prosess of trial and error...
That seems needlessly time consuming.
Can anyone sugest a better alternative?
_____________________
I've made my statement and I stand by it, but I could be wrong.
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
11-19-2006 15:14
Though there might be a scriptish way around this, the problem likely is with the animations themselves.
If you are creating the animations and uploading them, make sure that Looping is not checked. If you are using animations from someone else, not sure what to tell you.
Geuis
|
|
Lost Oddfellow
Registered User
Join date: 15 Sep 2005
Posts: 33
|
11-19-2006 15:33
Ahhh wonderful. I can make my own animation, so I will definutly see about that. Thank you
_____________________
I've made my statement and I stand by it, but I could be wrong.
|
|
Raeyan Aldrich
Registered User
Join date: 14 Oct 2006
Posts: 44
|
11-20-2006 21:22
yes when you upload a BVH (animation file) it gives you the option to have the animation loop or not. The only other way to do this would be to call llStartAnimation() then call llSleep() with the time the animation takes to complete, then call llStopAnimation() but honestly it's probably easier to just pay the L$10 and re-upload the image 
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
11-21-2006 00:34
Right. If the animation is looped, you CAN try to time it and do a 'llStopAnimation()', but it's a real hack because the animation doesn't necessarily stop on each client at the same time.
|
|
Lost Oddfellow
Registered User
Join date: 15 Sep 2005
Posts: 33
|
11-21-2006 05:50
Yes indeed. I had tryed the llStopAnim rout and found it was needlessly complicated. It ment I had to take into account the length of each animation and put provision into the script for them one at a time rather than a script that simply handeled all animations equaly. That was coming to a total of 30 animations already, and 30 diffrent setting for the script. Not just that but I was having toruble getting the script to work appropriatly when you puch one button then another before the animation of the first had been stoped. I tryed calling llSleep but that caused the entire script to stop accept input, and creating new variables to check if a button had been ushed and if an animation was still playing and so on was just pushing the complexity up and up. I think I can live with a few hours of doing my own animations. All I need now is 300 L$ ^.^
Thank you very much for the help though everyone.
_____________________
I've made my statement and I stand by it, but I could be wrong.
|