- 0
scripting llSetKeyframedMotion() giving error: "Error, failed to play animation. Does your linkset exceed the complexity limit for keyframing?"
You are about to reply to a thread that has been inactive for 481 days.
Please take a moment to consider if this thread is worth bumping.
Question
Bubblesort Triskaidekaphobia
I have a simple box prim, with one script in it. Inside the script, I have a function that should use keyframed animation to move the box up along the z axis 1m, out along the x axis 0.5m, and rotate it 90 degrees about the z axis. That's it. A single key frame, for now, just to figure out how it works. I keep getting this error over and over, though:
Error, failed to play animation. Does your linkset exceed the complexity limit for keyframing?
I have tried linking the simple box prim to another box prim to see if it needs to be in a linkset of more than one prim to work, and that didn't change the outcome.
Here is a link to the lsl wiki page on llSetKeyframedMotion().
Here's a copy of my experiments to try to make this work. Don't let the length of the code fool you, it's all a series of commented out touch_start() events, becasue they all produce the same error, except the first touch_start() event. The first touch_start() works, and I put it in there to show what I'm trying to do with llSetKeyframedMotion(), except in the first one I do it with llSetPos() and llSetRot(). llSetPos() and llSetRot() won't do exactly what I want, but they are close enough that you can see what I"m trying to do. I really need keyframing features for what I'm trying to do, and I don't understand why it isn't working. Most of these touch_start experiments are from me trying to grab snippets from the LSL library and use them, but none of them seem to work.
It probably doesn't matter, but I'm doing all this in a premium sandbox.
Also, early on in the process, when I was just throwing random math at the problem, and trying to do this in a more complex script, I got a few errors about trying to rotate to NaN, and trying to move the object too fast, but I can't replicate those errors with simple code, so I'm not that worried about it. I'll fight those bugs once I figure out what the hell this linkset complexity garbage is. The wiki doesn't say anything about linkset complexity, at all. I'll have to update it when I solve this problem.
default { state_entry(){ llSay(0, "Hello, Avatar!"); } //This works, almost exactly as I want keyframing to work. The first time I click it, it does what I want keyframing to do (then it repeats the motion on subsequent clicks, which is not what I want keyframing to do). I can't control the damping time it takes to move the prim like this, so keyframing would be more useful to me. touch_start(integer total_number){ llOwnerSay("I am moving 1m up the z axis and 0.5m up the x axis, and rotating 90 degrees about the z axis."); llSetPos(llGetPos() + <0.5,0.0,1.0>); rotation z90 = llGetRot()*llEuler2Rot(<0.0,0.0,90.0>*DEG_TO_RAD); //the rotation that rotates about the z axis by 90 degrees llSetRot(z90); } /*Error in question: Error, failed to play animation. Does your linkset exceed the complexity limit for keyframing? The following blocks of touch_start code produced this same error, whether the script is in a single, plain, non-physical cube prim or a linked set of two cube prims, with the script in the root prim. The prim is not selected when it gives these errors: touch_start(integer total_number) { llOwnerSay("I am moving 1m up the z axis and 0.5m up the x axis, and rotating 90 degrees about the z axis."); list keyframes = [<0.5,0.0,1.0>,llEuler2Rot(<0.0, 0.0, 90.0> * DEG_TO_RAD), 5.0]; list options = []; //go with default options llSetKeyframedMotion(keyframes, options); } touch_start(integer total_number) { llOwnerSay("I am moving 1m up the z axis and 0.5m up the x axis, and rotating 90 degrees about the z axis."); list keyframes = [<0.5,0.0,1.0>,llEuler2Rot(<0.0, 0.0, 90.0> * DEG_TO_RAD), 5.0]; //lets try making the default options explicit list options = [KFM_MODE, KFM_FORWARD, KFM_DATA, KFM_ROTATION|KFM_TRANSLATION]; llSetKeyframedMotion(keyframes, options); } touch_start(integer total_number) { llOwnerSay("I am moving 1m up the z axis and 0.5m up the x axis, and rotating 90 degrees about the z axis."); list keyframes = [<0.5,0.0,1.0>,llEuler2Rot(<0.0, 0.0, 90.0> * DEG_TO_RAD), 5.0]; //lets try making the default options explicit list options = [KFM_MODE, KFM_FORWARD, KFM_DATA, KFM_ROTATION|KFM_TRANSLATION]; //other scripts using keyframed motion seem to set the primitive position to it's current position, so lets try that: llSetPrimitiveParams([PRIM_POSITION, llGetPos(), PRIM_ROTATION, llGetRot()]); llSetKeyframedMotion(keyframes, options); } touch_start(integer total_number) { llOwnerSay("I am moving 1m up the z axis and 0.5m up the x axis, and rotating 90 degrees about the z axis."); list keyframes = [<0.5,0.0,1.0>,llEuler2Rot(<0.0, 0.0, 90.0> * DEG_TO_RAD), 5.0]; //lets try making the default options explicit list options = [KFM_MODE, KFM_FORWARD, KFM_DATA, KFM_ROTATION|KFM_TRANSLATION]; //here's something else other scripts do: llSetKeyframedMotion( [], []); llSleep(0.2); //other scripts using keyframed motion seem to set the primitive position to it's current position, so lets try that: llSetPrimitiveParams([PRIM_POSITION, llGetPos(), PRIM_ROTATION, llGetRot()]); llSetKeyframedMotion(keyframes, options); } touch_start(integer total_number) { llOwnerSay("I am moving 1m up the z axis and 0.5m up the x axis, and rotating 90 degrees about the z axis."); //forget the rotation and just move. list keyframes = [<0.5,0.0,1.0>,ZERO_ROTATION, 5.0]; list options = []; //go with default options llSetKeyframedMotion(keyframes, options); } touch_start(integer total_number) { llOwnerSay("I am moving 1m up the z axis and 0.5m up the x axis, and rotating 90 degrees about the z axis."); //forget the rotation and just move. //change time to an integer multiple of 45, because the wiki reccommends this: list keyframes = [<0.5,0.0,1.0>,ZERO_ROTATION, 90.0/45.0]; list options = []; //go with default options llSetKeyframedMotion(keyframes, options); } touch_start(integer total_number) { llOwnerSay("I am moving 1m up the z axis and 0.5m up the x axis, and rotating 90 degrees about the z axis."); list keyframes = [llGetPos() - <0.5,0.0,1.0>, llGetRot()*llEuler2Rot(<0.0,0.0,90.0>*DEG_TO_RAD), 5.0]; list options = []; //go with default options llSetKeyframedMotion(keyframes, options); } */ }
Link to comment
Share on other sites
16 answers to this question
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now