How to randomly play an animation in a state