Jump to content

Identified seating bug with running animations without a touched seat


You are about to reply to a thread that has been inactive for 181 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi Scribblers and scripters 

I am noticing my piano is working fine with dual seats until i notice if I store the key of a second person and try to use this in and first is trying in a laying position : As yo can see form the messages the animation for avatar in pink with key abd49e6e-347f-4630-90f2-fe0f7b8817d4 is changed from  'lay back 1' to 'sit lean left leg up1' when the avatar key c14f48db-464c-4ccb-af11-8b58e78d6aa0 sits for some reason the first Animation change does not occur but if set through the menu and same routine from the pink avatar pressing on the seat it does it correctly. This leads me to believe there is something different in storing keys as appose to using them from a JsON string. Has anyone else experianced this as in all other ways it works fine and looks and feels like a bug involving the avatar not pressing with there key and instead key being taken from elsewhere 

 

 

    run_time_permissions(integer perm) 
    {
       
        if(SIT_STATE==SIT_DEFAULT) {
            if (perm & PERMISSION_TRIGGER_ANIMATION) {
                llOwnerSay("In run_time_perms: " + llList2String(output,2));
                permissionResult = TRUE;
                if(last_anim!="")llStopAnimation(last_anim);
                llStartAnimation(llList2String(output,2));
                last_anim = llList2String(output,2);
            }  else {
                llOwnerSay("failed perms of animation");
                llOwnerSay("Permisions to trigger animation '"+llList2String(output,3) +"' failed perms of animation are are: " + (string)getPermsAsReadableString(perm) );
            }
        } else llOwnerSay("SitState ; Issue");
    }

The animation does not get run 

 

 

 

d0d476b010ffabb5ddcccb4ce968f8d3.png

Edited by VirtualKitten
To add more
Link to post
Share on other sites

I cant find away to sort this out its very strange I downloaded a move item from wiki 

This what calls it

do_seat_animation(integer i,string l_pos, string l_twist, string l_anim )

{

      //lines of code

      key l_key =  llJsonGetValue(SEATS_data,["seat"+(string)i,"key"]);

      llRequestPermissions(l_key, PERMISSION_TRIGGER_ANIMATION); //ask to animate it 

}

I CAN SEE AS THIS IS THE MAIN CALL FOR THE NORMAL SEAT WHY THE KEY IS DIFFERENT. SECONDLY. IF THE KEY WAS BAD IT WOULD NOT GET INO THE RUNTIME PARAMETERS WHICH IT DOES  WITH THE CORRECT ANIMATIONS . I AM VERY FRUSTRATED WITH THIS AND WOULD LIKE SOME HELP PLEASE

Link to post
Share on other sites

You need somebody else to witness what's happening, as often the clientside animations might appear to be frozen to you but somebody else witnessing them does see the animations working properly. it's something I don't understand myself but I've encountered it enough times to be aware it's a prevalent problem, just no idea why or how to circumvent it.

Link to post
Share on other sites

You have to use request perms as it's the only way that you get to specify the key of the avatar to be animated. without it, calling StartAnimation is simply going to play a new animation for the last avatar for which it obtained animation permissions.

ETA Ah., I see the problem, from the wiki for llRequestPermissions

  • Scripts may hold permissions for only one agent at a time. To hold permissions for multiple agents you must use more than one script.
Edited by Profaitchikenz Haiku
Link to post
Share on other sites

It took a bit of digging to find why you couldn't animate the second person, and the detail was buried. But I think you are going to have to do this:

Have your main script - sit and animate the first person to sit on the stool, and keep a record of the second sitter, initially NULL_KEY

Script 2 - let's call it side-sitter - which s addressed by a link message from the first script.

When an additional sitter is detected, the main script must pass to side-sitter the key of the new avatar, and the name of the animation, plus I suspect the message number 1 for animate them and 0 for stop animating them.

There's some other details to be addressed, such as should the main-script pass NULL_KEY to the second as a way of saying "clear the second seat", but I  have faith in your ability to get there :)

 

Edited by Profaitchikenz Haiku
Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 181 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...