Jump to content
You are about to reply to a thread that has been inactive for 1516 days.

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

Recommended Posts

Posted (edited)

I don't know the context of your situation, but one way is to use llGetAnimation(llGetOwner()) in an attached prim.  SL default animations are; "Standing" if not sitting,  "Sitting" if sitting on a prim, or "Sitting on Ground" if sitting on the ground.  Of course, any AO usage will complicate the result.  If the animation name is "Sitrting" then TRUE, you're on a prim, else if it's "Sitting on Ground", then FALSE, you're not sitting on a prim.

Edited by DoteDote Edison
Posted

After seeing the responses and re-reading the question I realize that "whether or not I am seated on an object" is about any object, not any particular object, but just in case that ever comes up, OBJECT_ROOT is handy:

default
{
    state_entry()
    {
        key owner = llGetOwner();
        key ownerSeat =  llList2Key(llGetObjectDetails(owner, [OBJECT_ROOT]), 0);
        integer ownerSittingp = ownerSeat != owner;	// bool, for ANY object
        llOwnerSay((string)ownerSittingp);
    }
}

 

  • Like 2
Posted (edited)

llGetAgentInfo would be the way to go, but you'd need it on a timer. Below is a very rough idea, but check llGetAgentInfo for more details

integer CheckAgentSitting()
{
    integer iAgentSitting = llGetAgentInfo(llGetOwner());
    return (iAgentSitting & AGENT_SITTING);
}

timer()
{
    integer iAgentSitting = CheckAgentSitting();
}

 

Edited by Bugs Larnia
You are about to reply to a thread that has been inactive for 1516 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
×
×
  • Create New...