Where an Avatar is sitting?
Quinn Ying
Actually, there's no way for a script inside an attachment to know anything about the object they're sitting on. While the opposite is true (an object can accurately determine the avatar sitting on it) an avatar can check if it's sitting, but not the object they're sitting on.
proposal: the change() event with the CHANGED_LINK flag is actually useless inside attachments, since attached objects can't merge or unmerge with other linksets. It could be used in an attached object to detect a sit event with related object.
Log In
Lucia Nightfire
llList2Key(llGetObjectDetails(llGetOwner(),[OBJECT_ROOT]),0);
Use the above to get what the owner of the script is sitting on.
Maestro Linden
Yep, that should work. Per the OBJECT_ROOT row in https://wiki.secondlife.com/wiki/LlGetObjectDetails :
Gets the id of the root prim of the object requested.
If id is an avatar, returns the id of the root prim of the linkset the avatar is sitting on and linked to (or the avatar's own id if the avatar is not sitting on an object within the region).