select anim REM - anim holds which animation to play case 1 REM - anim range for idle ll=1 REM - set lowest keyframe to 1 lh=10 REM - set highest to 10 endcase case 2 ll=11 lh=19 endcase endselect cl=cl+1 REM - cl holds the current frame of animation if cllh then cl=ll REM - if current frame is higher than highrange, set to lowrange