Jump to content

How do I detect if the owner (me) is sitting on an object?


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

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

Recommended Posts

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
Link to post
Share on other sites

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);
    }
}

 

Link to post
Share on other sites

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
Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 222 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
×
×
  • Create New...