Is there a way to have multiple animation for the same action ?
I intend to have 2-3 different animations when the player dies and want it to play those randomly.
Player gets hurt > Random Death Animation > flash on and off then respawn.
Currently i have the respawning working well, but would certainly like to know how/ if such task is achievable.
When the player dies, you can have a Random.Range, for each of your death animations.
Like so:
private void HandleDeathAnimations()
{
int i = Random.Range(1, 4); // range is X to Y -1 for ints. [1-3 here]
switch(i)
{
case 1:
animator.SetTrigger("Death1");
break;
case 2:
animator.SetTrigger("Death2");
break;
case 3:
animator.SetTrigger("Death3");
break;
}
}