Don't click here unless you want to be banned.
LSL Wiki :
llGetAnimationList
HomePage
::
PageIndex
::
RecentChanges
::
RecentlyCommented
::
UserSettings
:: You are crawling22.us.archive.org
**##[[list]] llGetAnimationList([[key]] id)##** [[return Returns]] a [[list]] of [[key keys]] of all playing [[animations]] for [[AgentAndAvatar avatar]] **##id##**. ##[[llStopAnimation]]## or ##[[llStartAnimation]]## may be useful here. Example: %%(lsl)// stops all currently running animations when clicked default { touch_start(integer num_detected) { llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { if(perm & PERMISSION_TRIGGER_ANIMATION) { list anims = llGetAnimationList(llGetPermissionsKey()); // get list of animations integer len = llGetListLength(anims); integer i; llSay(0, "Stopping " + (string)len + llGetSubString(" animations",0,-1 - (len == 1)));//strip the "s" when there is only 1 to stop. for (i = 0; i < len; ++i) llStopAnimation(llList2Key(anims, i)); llSay(0, "Done"); } } }%% Another Example: %%(lsl)// gets the key of an animation as it starts it // -sendao key startAnim_FindKey( key who, string animname ) { if( llGetPermissions() & PERMISSION_TRIGGER_ANIMATION ) { list prelist = llGetAnimationList( who ); llStartAnimation(animname); list postlist = llGetAnimationList( who ); integer i; integer len = llGetListLength(prelist); prelist = llListSort( prelist, 1, 1 ); postlist = llListSort( postlist, 1, 1 ); for( i = 0; i < len; i++ ) { if( llList2Key( prelist, i ) != llList2Key( postlist, i ) ) return llList2Key(postlist, i); } if( i <= llGetListLength(postlist) ) return llList2Key( postlist, i ); } return NULL_KEY; } %% ---- [[functions Functions]] | [[AgentAndAvatar Agent/Avatar]] | [[animation Animation]]
Valid XHTML 1.0 Transitional
::
Valid CSS
:: Powered by
WakkaWiki 0.1.2