Jump to content

Limit the range of the ability to sit on an object


Tattooshop
 Share

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

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

Recommended Posts

I can't think of an easy way to do it.  If your script was in an Experience, I imagine that it might be possible to put a SLPPF statement in state_entry of the AvSit [A] script to allow SCRIPTED_SIT_ONLY and then add a touch_start event whose only purpose is to measure llVecDist( llGetPos(),llDetectedPos(0) ) and then use llSitOnLink to force seat the avatar if the distance is small enough.  I'm not sure that it would work, or that it wouldn't mess up something else.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

for non-Experience and non-RLV it gets pretty messy but is doable

the main issue is what to do when a person beyond the allowable range (typically not detected in range of a sensor) sits on the chair

a way is to move such an person as a link away from the chair and then unsit them (tell this person to move closer after unsitting them)

basic example of the distant unsit:

integer n = llGetNumberOfPrims();
key k = llGetKey(n);
if (llGetAgentSize(k)) // is an agent
{
   llSetLinkPrimitiveParams(n, [PRIM_POSITION, some_distant_vector>]);
   llUnSit(k);
}   

 

Edited by Mollymews
types
  • Thanks 1
Link to comment
Share on other sites

You can, but the question is, is it worth the effort?

You could for example enclose the object in question in a larger transparent prim that didn't allow sitting, which changed size to shrink to less than the object in question when an avatar or more were detected within the required range: once there was nobody sitting on the object or in the allowed range the shielder prim expands in size again. As it's transparent most prim-sitters won't see it and their long-range clicks on the visible object will give the famous "no room to sit here" response. But it wouldn't be foolproof, if somebody were to be stood inside the range a prim-sitter would then be able to click in and join them.

Molly's approach is probably the most sensible, the perfect solution would be to unsit them at exactly the point from which they'd started their long-range sit.

  • Thanks 1
Link to comment
Share on other sites

There's the privacy checkbox, "Avatars on other parcels can see and chat with avatars on this parcel". If that's on, some additional restrictions could apply:

  • Can't cam into the parcel from outside.
  • Can't sit on anything to which you don't have an unobstructed line of sight from avatar to seat.

Then if you closed and locked your doors, no one could get in. This would reduce the need for ban lines.

  • Like 1
  • Confused 1
Link to comment
Share on other sites

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