Don't click here unless you want to be banned.

LSL Wiki : llStartAnimation

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl411.us.archive.org
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 built-in standard 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 documentation claims "This function starts animation anim for the avatar that owns the object.", this is incorrect; as long as permissions have been granted, any avatar can be animated using llStartAnimation -- chairs, pose balls, whatever. (Another example: driver and passenger seat on vehicle can usually seat anyone -- sit animation -- even though driving is normally restricted to owner.)

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
A: This wasn't a change added in 2006, key support never made it out of the 1.4 Preview. I take full credit for this (I flaunted an animation logger with playback functionality in front of a few lindens). Sex animations can be pretty funny out of context. - BW


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Agent/Avatar | Animation
Comments [Hide comments/form]
I consider this a bug, but here's a work around:
When sitting via the pie menu (such as boarding a vehicle):
When trying to use the animation "sit_ground" (crossed legs), you first need to call llStopAnimation("sit"), then call llStartAnimation("sit_ground"). Appears that only sit_ground has this problem and other animations, like "motorcycle_sit", work without first needing the llStopAnimation("sit")
-- BosozokuKato (2004-06-27 20:51:03)
This is a side effect of the animation priority. The "sit" has a higher priority than sit_ground, while the motorcycle sit has a higher priority than both. It is probably a good practice right now to stop sit with any custom anims, otherwise you might get some strange artifacts.
-- BuhBuhCuh (2004-06-28 16:16:08)
Attach a comment to this page: