LSL and Animations...
|
|
Joy Iddinja
Registered User
Join date: 15 Sep 2006
Posts: 344
|
02-28-2008 22:36
I've posted ot the Animation forum, but those folks are useless. I was hoping I could get a real answer on this.
Is there anything in LSL marker that identifies the end of an animation, or means for tracking the exact time an animation runs ONCE from start to finish. I know if you create an animation, your animator program times it, but if you use an animation that was full perm, but not your own work, how can you time it?
I ask because I'm want my scripter to create a poseball script that cycles through multiple animations. She says she is unsure if that can be done. I ticketed LL but I thought I'd try here too.
|
|
Nimbus Rau
Salmon pie? Where?
Join date: 15 Apr 2007
Posts: 292
|
02-28-2008 22:49
Wouldn't that be handy! Also, a way of determining the exact length of a sound clip within SL would be nice, too. I know of no way to do what you ask using tools with SL. But there's plenty I still have to learn, so the fact that I haven't found a way to do it doesn't mean that nobody has. It just means that it's not a simple thing that is easily worked out, I think.
|
|
Joseph Abel
Leaves no pawprints...
Join date: 20 Aug 2006
Posts: 781
|
02-28-2008 22:52
I am weak with the scripting force, young padewan...but my thought is this:
Wouldn't it work if you inserted all the animations in the poseball, write a notecard with the animations and order in which they'll play, then write a script with a call to the notecard, to check it sequentially?
I do not know the commands, but I would think that would give usable resources, and bypass the need to know the timing of an animation.
Then again, I may be waaaayyy off base here.
_____________________
Nimbus rated!! From: Nimbus Rau So your final Nimbus Score is a grand total of 8.55. A magnificent achievement!
|
|
Nimbus Rau
Salmon pie? Where?
Join date: 15 Apr 2007
Posts: 292
|
02-28-2008 23:08
What I'd do, if it were me, would be to simply play the anims and time them with a stopwatch or some such, then set up the poseball so that it basically does something like this: llStartAnimation ("anim 1"  ; llSleep (length of anim 1, more or less, in secs); llStartAnimation ("anim 2"  ; llSleep (length of anim 2); ...and so on. etc. Of course, you'd probably have to set up the perms and such in the script as well (I'm not a poseball expert - see http://www.lslwiki.net/lslwiki/wakka.php?wakka=llstartanimation for more details). But if you get something like that working then you can just tweak the timings by hand a bit at a time until it seems to be running smoothly. It's a little fiddly, but it should be quite do-able, I'd think.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
02-28-2008 23:15
as the 'useless folks' in the tips forums probably already explained, there is no way to get time information for an animation, unless the uploader was kind enough to include the information (notecard, filename note, etc)... Blame LL since you can apparently wait till an animation is done within a gesture (doesn't work on loops). the best you can hope for is just to keep checking if the anim is still playing (also won't work on loops).
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Ravenhurst Xeno
Consiracy with no purpose
Join date: 20 Jan 2007
Posts: 147
|
02-28-2008 23:24
From: Joy Iddinja Is there anything in LSL marker that identifies the end of an animation, or means for tracking the exact time an animation runs ONCE from start to finish. I know if you create an animation, your animator program times it, but if you use an animation that was full perm, but not your own work, how can you time it?
I ask because I'm want my scripter to create a poseball script that cycles through multiple animations. She says she is unsure if that can be done. I ticketed LL but I thought I'd try here too.
Once the script has initiated an animation, it can make periodic calls to llGetAnimationList to determine when the animation has finished running. Keeping in mind a looped animation will never finish running on its own.
|
|
Crystal Falcon
Registered Silly User
Join date: 9 Aug 2006
Posts: 631
|
02-29-2008 13:05
That's a different question than what you asked in the Sequential Animation posting to the animations forum..  There are scripts in the library that play sequential animations. It would be possible to make a script time how long an animation runs, and I have also made scripts that play animations longer than the length limit by matching them to play one after another, accommodating lag and whatnot (you don't want to start the second when the first ends of course, or there will be a delay when the avatar simply stands there between the two, depending on how long it takes various viewers to receive the new animation). Although LSL doesn't have a way to "preload" an animation, that doesn't mean it can't be done..  Again, per your post in the animation forum, there are dance machines that play anims in sequence. Yes, a script could be made that would time a non-looping animation. Yes, a poseball could cycle through multiple animations. I have done this with an audience of people watching Rocky Horror, all of them dancing the Time Warp in sync to the movie, the Time Warp dance was made up of multiple animation parts (I didn't need poseballs for this, just the one prim script from the library heavily modified and timed to the movie). The link to that is in the post in the animation forum... 
|