function ShowAnimationIndexes takes unit u returns nothing
local integer i=0 // animations start at 0 actually
loop
exitwhen i>15 // have yet to see a unit with more than 16 animations
// though some may have only half so many
call SetUnitAnimationByIndex(u,i) // set animation to index i
call BJDebugMsg("Animation Index: "+I2S(i)) // display to players what animation index is being performed
call TriggerSleepAction(3.) // wait so we can see what the animation actually is
set i=i+1 // try the next one
endloop
endfunction