Jump to content

Movable static pose - possible?


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

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

Recommended Posts

I have aproject. It is a hearse vehicle. All running fine. Now I want to have a sliding coffin in and out of the back. fairly easy with a door like script and now working. The problem is that the sit script (a simple poseball one) I used does not move with the prim (i.e. the coffin with the poseball script in it) when it slides in and out. The sit is apllied and the person stays static hanging there while the prim coffin slides in.

 

Is this even possible? If so any pointers at all please for me to look at. I have to say it is not something I have seen anywhere else in sl.

 

Thanks,

 

Marcia

Link to comment
Share on other sites

Well, I'm not much of a scripter, but I can give you a pointer.

Go to a fairground and you'll see lots of builds where static or animated seat poses are moved around. Ferris wheels, all sorts of carusels, merry-go-rounds... they all use the feature you discribed. So, yes, it's possibel. I made a rotating float myself, and had no problems. And when you move an object around with an avatar sitting on it, the avatar moves with the object. My suggestion is to try another sit script.

Link to comment
Share on other sites

My guess is that your sit target is set with respect to the root prim of the linkset (the hearse?), not the coffin.  Try just putting a very simple script in the coffin itself.  Off the top of my head (I can't get in world to test this...), I think something like this should work:

 

 

default{    state_entry()    {        llPassTouches(FALSE);        llSitTarget(<0.0,0.0,0.1>,ZERO_ROTATION); //Adjust sit target as necessary    }        changed(integer change)    {        if(change & CHANGED_LINK)        {            key gAv = llAvatarOnSitTarget();            if (gAv)            {                llRequestPermissions(gAv,PERMISSION_TRIGGER_ANIMATION);            }        }    }    run_time_permissions(integer perm)    {        if(perm & PERMISSION_TRIGGER_ANIMATION)        {            llStartAnimation("My_Coffin_Sit_Animation");        }    }}

 

 

 

 

Link to comment
Share on other sites

Are you sure about that, Rolig?  My reading of the OP is that the coffin and hearse are all part of the same linkset, and when the coffin moves -- using llSetLinkPrimitiveParamsFast, one would imagine -- its occupant, of course, doesn't move with it because the script thinks that the avatar is an extra prim that it's not been told to move.

In those circumstances (coffin and hearse are linked together), I either would use something based on Strife's user function UpdateSitTarget, telling it to fire when I tell the coffin to move, or (which would probably be the simpler solution and might look better, too) have two corpse anims, identical save for their offsets, and switch between them for the two coffin positions

My caveat for Marcia, though, is that the UpdateSitTarget function is brilliant, and isn't diffcult to use once you understand how to use it, but it's a bit incomprehensible the first time you read it (or I found it so).  If you want to have a shot at it, then maybe asking about it Scripting Tips would be an idea.  Or I will try to knock together a simple working example over the weekend if I can find the time.

Link to comment
Share on other sites

building from Inulla's assumption that it's all one linkset, there is  a slightly simpler solution if you don't wnat to deal with the update sit target code, and that's to treat the avatar as if it were a prim, and simply move it it when you move the coffin.

the down side being that when the coffin is in the moved position, sitting on the appropriate pose ball will still have the same behavior as before... they'd need to be seated in advance or have a flag that tells the poseball to move them as soon as they sit.

Link to comment
Share on other sites

Yeah, it's always that way.  I forgot that when I posted my solution earlier. The av will move if seated on the root prim of a linkset, but not on a child. LSL doesn't allow us to rank linkset elements heirarchically, so all child prims (including a seated av) are created equal.  You can't be a child of a child, in other words.

Link to comment
Share on other sites

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

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
 Share

×
×
  • Create New...