Leo1452 0 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 post Share on other sites
DoteDote Edison 20 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 post Share on other sites
Mollymews 4,899 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 post Share on other sites
Qie Niangao 4,497 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); } } Link to post Share on other sites
Bugs Larnia 29 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 post Share on other sites
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now