Jump to content
  • 0

I am looking for a (free) sitting script to put in a chair that says "there is no room here to sit"


MiriamAnneGwendolyn
 Share

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

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

Question

4 answers to this question

Recommended Posts

  • 0

If you're asking for a free script there's tons of repositories found with an easy bit of searching~

I'm feeling generous, so here~  a sit script written in 2 minutes:

 

default
{
state_entry()
{
    llSetMemoryLimit ( 4096 ) ;
    llSitTarget ( < 0.01 , 0.0 , 0.0 > , ZERO_ROTATION ) ;  // Change 3 numbers to move sit target.
    llSetClickAction( CLICK_ACTION_SIT );
}
}

 

Link to comment
Share on other sites

  • 0

The script that polysail generously provided should do the job for you.  If you want to put a particular animation into your chair, here is a very simple sit script from the LSL Library, here in the forums >>> https://community.secondlife.com/t5/LSL-Library/Basic-Pose-Ball-script/m-p/719317 .  In this script and in polysail's, you will find a line that says

llSitTarget( <0.0, 0.0, 0.01>, ZERO_ROTATION );

That line tells you exactly where the avatar will end up when s/he sits.  As written in the bit I just wrote, that position will be 0.1 m above the center of the chair and facing "forward" (actually, facing in the chair's own +X direction).  You will almost certainly need to change something in that line for your particular chair.  It will take some experimentation, so be bold.  If the rotation needs to be changed, though, you'll need a little help, so find a friend who knows a little about LSL scrfipting.

Link to comment
Share on other sites

  • 0

The "no room to sit" error usually occurs when you've got a piece of furniture that doesn't use poseballs, accommodates more than one sitter, and the furniture is inside the bounding box of another object (near a large sculpted palm tree, for example, or on a region with a "sim surround." 

I won't go into a full technical explanation but, essentially, if there are more sitters than there are sit targets in the object, the simulator can get confused about where you are trying to sit (on the furniture or the sim surround).

If this is the case -- that the furniture will accommodate more than one sitter and it doesn't use poseballs -- then the fix is a simple one.   You just set sit targts in some of the child prims.    The animation script (nPose or AVsitter or PerfectStitter or whatever) won't use them, but they will help the simulator understand what's going on.

Try dropping this script into the furniture.  It will do its work and remove itself.

//put a dummy sit target in all child primsdefault{	state_entry()	{		integer max = llGetNumberOfPrims();		do{			llLinkSitTarget(max,<0.0,0.0,0.1>,ZERO_ROTATION);		}		while(--max>1);		llRemoveInventory(llGetScriptName());	}}

 

Link to comment
Share on other sites

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