Jump to content

change boat sitting animation and location to different sub-link position and animation


Restless Swords
 Share

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

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

Recommended Posts

i have boat with 2 chairs, each with a sit script.  I want to be able to sit in on one, and then click on the other and move over to its locatin and animation without having to unsit my avatar.  i have seen this done in multi-pose sailboats, etc.

- right now, when i sit and click the other chair, the menu shows "stand" and not that other chairs sit.

I first thought the solution is NOT to use sit at all, but if i just position my avatar and animation then it does  not move with the boat, it seems the avatar MUST sit to move with the boat.

 

Link to comment
Share on other sites

You could probably link the chairs to each other (or the boat) and rewrite your scripts to UnSit you from one chair when you click to sit on the other one.  That ought to work, I think. It's worth a try, anyway .  The problem I see is that if you stand for even a second while the boat is in an area where the parcel owner has blocked object entry, the boat will be returned.

Link to comment
Share on other sites

Well, you don't actually have to sit in the other chair.  You just have to look like you're sitting in it.

 

touch_start(integer num){    if ((llGetLinkName(llDetectedLinkNumber(0)) == "OtherChair") && (llDetectedKey(0) == llAvatarOnSitTarget())    {        llSetLinkPrimitiveParamsFast(llGetNumberOfPrims(),[PRIM_POS_LOCAL, <local_pos_of_other_chair> + <offset>]));    }}

That is, if you have just clicked on the link named "Other Chair" and if you are the person sitting, then move to the local position of the other chair plus a little vertical offset so that you're actually above the chair itself.  This works because you (the seated avatar) are always the last link added to the linkset (that is, you are the link numbered llGetNumberOfPrims() ) and this code snippet is just moving you to a new position.  Without UnSitting from the place where you are still actually seated.

You'll have to do a little magic to get the local position of the other chair, and you might need to mess with rotations if the chairs aren't facing exactly the same way, but those are fun little details.

 

Link to comment
Share on other sites

Ooooooo, Interesting.

One of the challenges is that there are many objects, each having a different SitPosition and SitRotation and even different Animation. But perhaps I see the light ....

In the sailboats, you touch the boat and then sit (onto a default position/animation or the last used one) and then you get a select target (position+animation) dialog the same as you get on all subsequent touches. So i think that esentually all sits for all prims are actually done from that one root  touch script (and not using SitTargets in the various prims) setting the avi Position/Rotation/Animation.

I can see possibilities here.  THX !!!

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2315 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
 Share

×
×
  • Create New...