LSL Wiki Mirror 7-7-7 : llStartAnimation

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
llStartAnimation(string anim);

Triggers the animation anim. In order for this to work, the script must have the PERMISSION_TRIGGER_ANIMATION permission on an avatar. See llRequestPermissions and llGetPermissions for more information on permissions.

Built-in animations always work, but if anim is a custom animation, it must be contained in the inventory of the scripted prim.

It is usually good practice to check llGetPermissions before calling this function. The fact that this is not usually done is the reason so many "Script trying to trigger animations but PERMISSION_TRIGGER_ANIMATION permission not set" messages happen, which can be annoying (especially if they keep trying over and over).

An animation which doesn't end on its own can be stopped with llStopAnimation.

To animate someone sitting on an object, it's a good idea to stop the generic sit animation first (llStopAnimation("sit")) unless the new animation has a higher priority than the default sit.

See animation for a current list of animation names.

ExampleAnimationScript shows an example of this function's use (it is the freely-distributed animation script many people use).

Compare with llStopAnimation.

Note: while the official docs claim "This function starts animation anim for the avatar that owns the object.", that is incorrect; as long as permissions have been granted, any avatar can be animated using llStartAnimation.

Q: Is there a way to load an animation from a key?
A: No.
A: This is a change from older script behavior, one of several copy protections to have been added to LSL in 2006. - Ice


Functions | Agent/Avatar | Animation
There are 2 comments on this page. [Display comments/form]