IDLE – the animation is played cyclically until it is replaced by another animation.
ONESHOT_STILL – the animation is played once, and after it is finished, the object remains in the posture it took in the last frame of the animation.
ONESHOT – the animation is played once, and after it, the object’s standard idle animation is started.
If you are setting the number of repetitions using your own code, then you should play a single animation using ONESHOT_STILL / ONESHOT.