Hello!
Is it possible to play one of a few animations for an animation state?
For example I have animation state “Attacking” and I want to play three different attack animations randomly.
Pre-4.3, we would create an Integer parameter – for example, called AttackVariation – and create transitions to the three attack animations. The transition to attack #1 would have a condition “AttackVariation Equals 1”, the transition to attack #2 would have a condition “AttackVariation Equals 2”, etc. Then, to trigger a random attack in script, set the AttackVariation parameter to a random number [1,3].
In 4.3, you can Play() or CrossFade() directly to states. Put your attack state hash IDs in an array, and randomly CrossFade() to one of them.
Check this thread. Random animations for idle state but might fit what you are looking for.