Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Two questions about animation and sit target...

Yumond Oh
Registered User
Join date: 27 Feb 2007
Posts: 2
08-30-2007 05:43
Hi there,
I have two problems and need a simple and quick solution. ;)

First, I have a chair with a seat cushion, backrest and armrest. Now people are complaining, that they do not sit right when they missed to click on the right area.

Now, I tried to make a big transparent sphere around the whole chair, added a small script with a llSitTarget(), but that caused problems too.
First of all, I could not set the rotation and second when "standing up", the avatars stands on the chair (or rather the sphere) not in front anymore.

So what is the quick solution here? I do not want to exchange the sit animation or anything...


My second problem is permission related I suppose.
I have made a camera object and an related animation (more like a pose).
I want to start the animation (holding the camera) when I attach the camera to the right shoulder. I have put the animation and a script into the camera object, but it keeps telling me, there are permissions missing to play the animation.
Could you again give me a simple example script for this?

Sorry if my question are a little bit to beginner like, I tried to read through the wiki, but the example code there did not work for me.

Thanks a lot
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
08-30-2007 07:32
From: Yumond Oh
First, I have a chair with a seat cushion, backrest and armrest. Now people are complaining, that they do not sit right when they missed to click on the right area.
Do I understand correctly that exactly one of the chair prims has ever had an llSitTarget defined? And are they linked together? I think both of those must be true in order to ensure that a sitter will end up in the right spot, regardless of where they click when choosing "sit".
From: someone
I want to start the animation (holding the camera) when I attach the camera to the right shoulder. I have put the animation and a script into the camera object, but it keeps telling me, there are permissions missing to play the animation.
Could you again give me a simple example script for this?
You probably already have most of the relevant code in the script you're using for the chair. Attachments, like sat-upon prims, are always granted PERMISSION_TRIGGER_ANIMATION, but you have to ask for it anyway. In the case of sitting, that request for permissions code will show up in the changed() handler, specifically code handling the CHANGED_LINK event that occurs when the avatar sits; in an attachment, you'll probably want that same permissions request into the attach() event handler (and, if I guess correctly and that handler currently has the llStartAnimation call, you'll want to move that to the run_time_permissions() handler, just like it is in the sit script.

Hope that helps.