I am trying to find a script that can use animations in furniture without pose balls. I came across an older script called "Multi Sit Script - Anxiousness Chair v.1." Unfortunately, once I input the script into the cushion of the chair and link the prims, I get an error message when I sit down. The error reads "Object: Script trying to stop animations but PERMISSION_TRIGGER_ANIMATION permission not set" I searched the forums and found 1 thread about it from '04, but can't figure out how to solve for this error. Can anyone help? I'm fairly new to scripting, so appreciate any dumbed down explanations/solutions
Thanks in advance!Below is the script.
//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,270>; //Enter a vector rotation for the sit...
vector SitLoc = <0.08,0,.45>; //This is the sitTarget positioning... CANNOT EQUAL 0
string LoadText = "I'm exhaused"; // 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));
llMessageLinked(LINK_SET, FALSE, "ChangeDisplay", NULL_KEY);
}
}
}
run_time_permissions(integer perm)
{
if (perm)
{
//This starts the first animation...
llStopAnimation("sit"
;llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
llSleep(1);
llMessageLinked(LINK_SET, TRUE, "ChangeDisplay", NULL_KEY);
curAnim = 0;
}
}
}