Valradica Vanek
Registered User
Join date: 1 Aug 2006
Posts: 78
|
12-27-2006 06:01
I am working on a project where I need to be able to detect the end of animations. Is there any way to do this in LSL? is there an event that is triggered at the end of animations? or is it possible to set an animation so that it does not trigger untill the current running animation is ended like the sound animations?
I know i could set timers and try to match the framerate but is there an easier way?
Curious in SL. Val Vanek
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
12-27-2006 06:26
Sorry, no, as far as I'm aware the only option is to time them (and you can't detect the length of an animation either, you'll have to write it down when you create it or use a stopwatch). Animation queuing would be very useful but it's not present.
_____________________
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
|
Tyann Toll
It went... where?!
Join date: 17 Dec 2006
Posts: 37
|
12-27-2006 08:14
Im sort of fiddling with the same question, and am probably going to do it by timing the animations.
But, I am wondering if you can't somehow use llGetAnimationList or llGetAnimation. Perhaps if you do not use looping animations you would be able to detect when a specific animation is no longer playing, and then react to that?
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
12-27-2006 08:59
you could continually poll llGetAnimationList to see when the animation no longer shows up in the list (it stopped). However it could potentially be laggy if not done carefully.
|
Tufif Kraft
Registered User
Join date: 4 Nov 2006
Posts: 64
|
12-27-2006 14:37
If you need the exact time of an animation, you may be able to IM the creators and ask them. They could tell you the number of frames and the frame rate and you could do the math from there.
|
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
|
12-27-2006 15:03
Somthing I have been doing with sounds which could be done with animations as well format your items like "name,time" so whe you call the item name you also have the time frame with it. Just use llCSV2List then get the second item in the list which would be the time. I usualy just put the time as a float in seconds.
|