llGetAnimationList
function
Function syntax
list llGetAnimationList(key avatar// UUID of the avatar in the same region.
);- Returns
list- Energy
- 10
Returns a list of keys (UUIDs) representing all active animations currently playing on the specified avatar.
Returns a list of keys of playing animations for avatar.
list result = llGetAnimationList(NULL_KEY);Caveats
Section titled “Caveats”- There is no internal mechanism to get the name of the animations playing.
- Standard animations can be started and stopped by scripts, so the list returned may not accurately reflect the avatar’s state. Use
llGetAgentInfoandllGetAnimationwhen this matters. - Some motions are local to the viewer and cannot be detected by scripts.
- Animations that are triggered by other animations are local to the viewer and cannot be detected by scripts.
Examples
Section titled “Examples”This example is a bit involved but there aren’t many applications for this function.
26 collapsed lines
//Simple Animation Override for Walkkey old_anim = "6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0";string new_anim="yoga_float";integer status;list check;key owner;
default{ state_entry() { owner = llGetOwner(); llRequestPermissions(owner, PERMISSION_TRIGGER_ANIMATION); check = [old_anim]; }
run_time_permissions(integer p) { if(p & PERMISSION_TRIGGER_ANIMATION) { llSetTimerEvent(0.2); } }
timer() { if(llGetAgentInfo(owner) & AGENT_WALKING) { list anims = llGetAnimationList(owner); if(~llListFindList(anims, check)) {17 collapsed lines
status = 1; llStartAnimation(new_anim); llStopAnimation(old_anim); } } else if(status) { llStopAnimation(new_anim); status = 0; } }
on_rez(integer p) { llResetScript(); }}Known issues
Section titled “Known issues”From the issue templates included by the wiki article:
- BUG-1731: type=bug|llGetAnimationList sometimes returns a NULL_KEY
See also
Section titled “See also”Functions
Section titled “Functions”llGetAgentInfo— Gets the avatar infollGetAnimation— Get the avatar’s base animation statellStartAnimation— Start an animation on an avatarllStopAnimation— Stop an animation playing on an avatar
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.