Multiple Animation Sets Using Sub-State Machines

So I have a character with a set of animations specifically for combat and a second set for patrolling, walking, and other non-aggressive routines.

What I thought I could do with sub-state machines was have my combat idle, run, attack, takedamage, etc in their own sub-state machine and the non-combat ones in the other and swap between the two state machines with a condition.

From testing however it appears I need to set transitions between every single state within each sub-state machine to every single state within the other.

Combat can be entered from literally any non-combat state instantaneously which is where the issue lies, I can’t have any cases where a non-combat state doesn’t immediately transition into a relevant combat state.

Did I miss something while doing my sub-state machines or is this sort of method not possible currently without having my animator window look like spaghetti?

Use the “Any State” node–transitions from that node will mean that so long as conditions are met, any animation will start the transition :slight_smile:

P.S. Sometimes spaghetti windows are necessary, especially when using Exit Time specific transitions :wink:

1 Like

You say spaghetti mess - I say work of art right there!