Leo1452 Posted October 4, 2020 Share Posted October 4, 2020 I'm trying to get a boolean value for whether or not I am seated on an object not counting the ground. Link to comment Share on other sites More sharing options...
DoteDote Edison Posted October 4, 2020 Share Posted October 4, 2020 (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 October 4, 2020 by DoteDote Edison Link to comment Share on other sites More sharing options...
Mollymews Posted October 4, 2020 Share Posted October 4, 2020 http://wiki.secondlife.com/wiki/LlGetAgentInfo test for AGENT_ON_OBJECT boolean example integer IamSittingOnAObject = ( llGetAgentInfo(my_agent_uuid) & AGENT_ON_OBJECT == AGENT_ON_OBJECT ); 2 Link to comment Share on other sites More sharing options...
Qie Niangao Posted October 4, 2020 Share Posted October 4, 2020 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); } } 2 Link to comment Share on other sites More sharing options...
Bugs Larnia Posted October 5, 2020 Share Posted October 5, 2020 (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 October 5, 2020 by Bugs Larnia Link to comment Share on other sites More sharing options...
Recommended Posts
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