Playing multiple copies of the same anim
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
12-30-2009 15:55
I'm looking at a "foot lock" device -- one of those things that freezes your foot relative to your ankle so if you're wearing boots or any other foot stuff that has components that attach both to your foot and your ankle, they stay together.
I think I have figured out the basic idea.. play a looping anim to lock your feet, and keep on restarting it (I don't understand why it should be necessary to restart it but it seems to work better if I do). Mine works in most circumstances but I'm comparing with one that works in all circumstances, and the difference is that the one that always works seems -- according to Advanced--Character--Animation Info -- to be playing four or five instances of the same anim, even though there's only one script and one copy of the anim in its inventory.
How on earth does it manage to do that?
|
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
|
12-30-2009 17:02
I think you are running into the animation priority. Each animation is given a priority, and the higher the number, the higher priority it has. If you play 2 animations, one with a priority of 2 and the other with a priority of 4, the animations with the high priority will move joints that may be frozen in the lower priority animation. So to lock someone's feet.. make an animation that has the highest priority, where the joints are locked where you want, and then make sure any other animation you play, is a lower priority. For how to lock joints, see the animation tips.
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
12-30-2009 17:16
Thanks. I understand the issue about priorities. But specifically -- and as much out of general interest as to solve the immediate problem -- I'm wondering how on earth the scripted item I found on xStreet manages (according to the display I see when I turn on Advanced--Character--Animation Info) to play several instances of the same anim.
I've tried starting and stopping and restarting, and looping, and whatever but I can only get my anim's uuid to appear once in the list above my head. In contrast, the uuid of the anim in the device is listed 4 or 5 times, and I just can't figure out how that's done.
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
12-30-2009 17:45
When animations get triggered, they are dropped into a stack in the viewer. It takes a short while for the extra copies to be discarded, and the debug display lets you see the sausage being made! The phenomenon is most easily seen if you have two or more different scripted animation sources running, like a regular AO and a second scripted object that fires off an animation in a tight loop like that. It's when triggers interleave between objects that you will most often see the duplicates.
|
jeaniesing Trilling
Loves to animate & script
Join date: 21 Oct 2006
Posts: 61
|
12-30-2009 17:48
Create the animation at prio4 with a lonnnnnng ease out time... create a script that checks llGetAnimationList and when any new animation starts your footlock anim is stopped and retriggered after a .02-.05 second delay... the long ease-out will take care of most of the jitters that might occur, but lag kills
_____________________
  Pinastri/113/171/30
|
Dante Breck
Spellchek Roxs
Join date: 29 Oct 2006
Posts: 113
|
12-30-2009 18:08
Innula, if you are making the device why not make the foot part and ankle part all one object and attach it to the lower leg instead of in two pieces then just hide the foot? I know its not a scripted solution but would be a lot easier depending on what you are trying to do.
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-31-2009 04:10
From: Dante Breck Innula, if you are making the device why not make the foot part and ankle part all one object and attach it to the lower leg instead of in two pieces then just hide the foot? I know its not a scripted solution but would be a lot easier depending on what you are trying to do. because the foot would still move outside of that area and ruin the effect? supposedly there is a way to trick the server into using a higher priority than 4 on upload, but I have yet to see any of these tricks work. short loop, short lead in, LONG lead out, and a repeat frequency somewhere less than half your lead out, seem to work quite nicely (and be friendlier than the carpet bombing of a fast timer (or 10), yes I've seen people use different scripts to theoretically speed execution for these...)
_____________________
| | . "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... | - 
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
12-31-2009 08:55
Thanks all.. with some tweaking of the anim, it's now doing what it's meant to. I was just confused by the apparent multiple instances of the same anim, which made me worry that I'd missed something in the scripting.
|