03-27-2006 18:26
I have a problem with detecting when an avatar sits. I cut from the wiki changed event, and eventually pared it down to this to see if it actually detects anything.

CODE

default
{
state_entry()
{
}

changed(integer change)
{
if (change & CHANGED_LINK)
{
if (llAvatarOnSitTarget() != NULL_KEY)
{
llOwnerSay("someone sit down?");
}
else if (llAvatarOnSitTarget() == NULL_KEY)
{
llOwnerSay("someone stood up?");
}
else llOwnerSay("woops");
}

}

}


Whether I sit down on or stand up from the object, I always get the second message, "someone stood up?". How do I get it to detect when I actually sit down???

Thanks,
Baron