Need a little help. I'm trying to make some items and have a script that allows you to makes items with animations in them. However some of the animations aren’t working properly when attached to the items. For instance, Animations that have the legs move of pose are only allowing the avatar to make a normal "sit" pose rather then animate their legs. However some animations seem to work well, allowing the legs to pose just fine. Am I missing something? Why wont the legs pose properly when the animation is attached to the same shape different item(different animation)? Any assistance would be great.
Vala
Post script, this is the script I am using for the animations:
//Anxiousness Chair v.1
//By: Kaneda Akenbono
//Enjoy, and I'd appreciate it if you left this on the script.
//
//Add the animations you want to your object.
//I pulled the stuff below into globals so you can easily modify this script without understanding any of the code.
vector Angle = <0,0,0>; //Enter a vector rotation for the sit...
vector SitLoc = <0,0,0.1>; //This is the sitTarget positioning... CANNOT EQUAL 0
string LoadText = "Hello Avatar"; // The text you want to show when the object loads...
string Context = "Sit"; //The text you want in the context menu...
//Globals!! WOOO!!
key user;
list animations;
integer animNum;
integer nextAnim = 1;
integer curAnim = 0;
//This part dynamically gathers all of the animations you've placed in the object for usage later...
initialize()
{
integer x;
list oldAnim;
animNum = llGetInventoryNumber(INVENTORY_ANIMATION);
for (x = 0; x < animNum; x++)
{
animations = oldAnim + [x];
oldAnim = animations;
}
}
default
{
state_entry()
{
initialize();
//For easy rotation in the llSitTarger enter the vector rotation below..
vector eul = Angle; //45 degrees around the z-axis, in Euler form..
eul *= DEG_TO_RAD; //convert to radians...
rotation quat = llEuler2Rot( eul ); //convert to quaternion...
llSay(0, LoadText);
//Text it says under the context menu...
llSetSitText(Context);
//Adjust the positioning of the user while siting... also need for llAvatarOnSit... if this value is equal to 0, it doesn't work, so set it to make it look right for your object
llSitTarget(SitLoc, quat);
}
touch_start(integer num_detected)
{
if (user = llAvatarOnSitTarget())
{
if (animNum > 1)
{
llStopAnimation(llGetInventoryName(INVENTORY_ANIMATION, curAnim));
llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, nextAnim));
curAnim = nextAnim;
if (nextAnim < (animNum - 1))
{
nextAnim++;
}
else
{
nextAnim = 0;
}
}
}
}
changed(integer change)
{
//If the user sits on the object...
if (change & CHANGED_LINK)
{
user = llAvatarOnSitTarget();
if (user)
{
llRequestPermissions(user, PERMISSION_TRIGGER_ANIMATION);
}
else
{
llStopAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
}
}
}
run_time_permissions(integer perm)
{
if (perm)
{
//This starts the first animation...
llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
curAnim = 0;
}
}
}