
At the same time, I'm also learning LSL. While I've seen alot of Poseball scripts or animation things, I really couldn't figure out the answer to my problem, and I feel it's key in my LSL progression.
Anyways, I've got everything set up perfect for my 'chair'. The avatar sits perfectly, etc. The problem is, it takes 2 sits the first time said avatar sits in that chair. The first time they try to sit, they'll simply stand there. They select stand, then sit and it works as intended from then on.
I assume that it has to do with checking for permissions, and the object not having permission to animate said avatar until the second time they try to 'sit'. Perhaps the order in which I have certain things is to blame?
Either way, I'd appreciate some help below.
default
{
state_entry()
{
llSitTarget(<.1,-.1,-.4>, <0,0,.8,1.0>
;}
changed(integer change)
{
if(change & CHANGED_LINK)
{
key avataronsittarget = llAvatarOnSitTarget();
if( avataronsittarget != NULL_KEY )
{
if ((llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) && llGetPermissionsKey() == avataronsittarget)
{
llStopAnimation("sit"
;llStartAnimation("sitting chair m06"
;}
else
{
llRequestPermissions(avataronsittarget, PERMISSION_TRIGGER_ANIMATION);
}
}
}
}
run_time_permissions(integer perm)
{
if(perm)
{
llStopAnimation("sit"
;//llStartAnimation("stand"
;this was the problem linellStartAnimation("sitting chair m06"

}
}
touch_start(integer total_number)
{
llWhisper(0, "OnePrimChair by Domneth Designs."
;}
}
Edited with the fix.
Thank you in advance,
~Domneth