Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Animation Permissions...

Mevo Syaka
Ganja Guru
Join date: 12 Dec 2006
Posts: 33
02-27-2007 12:26
Hi,
I have an object with 4 linked seats which animate the avatar when they sit on it. The problem is when I stand up and no one is sitting on the other seats I get the error "Script trying to stop animations but PERMISSION_TRIGGER_ANIMATION permission not set"

How do I get it to check if there are other people sitting on the other seats before trying to stop the animation?

All help is very much appreciated.
_____________________
FourTwenty Headshop



Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
02-27-2007 13:45
That usually occurs because the people who sat on those seats previously either logged off or teleported away while sitting in them. Since "CHANGED_LINK" is triggered for all scripts in the object, they all think someone is standing up.

Many multi-sit scripts just assume the avatar is still present, and try to stop the sitting animation whether it is still there or not. The error is in not updating the persistent "someone is sitting on me" variables BEFORE attempting to stop the animation. If you update AFTER you attempt to stop the animation, the error terminates the execution of the event at the llStopAnimation call, and never returns the seat to its "no one is sitting on me" state. So, anytime anyone sits in another sit spot, it will continue trying to stop the animation, because it still thinks there is someone sitting on the seat.

The "fix" is to update the script "state" before attempting to stop the sit animation. To avoid getting the error altogether, you might should do a sensor sweep of the area and see if the avatar is still present, and then only stop the animation if it is.