Download

A proper way of blending states, attack and one-off anims ?

I’ve been working on anims for my AI and now I am trying to wrap my head around correct setup of anim graph.

I have 3 cached states that I blend by enum into the final state (normal, alarmed and combat; each has its own idle2walk/run blendspace) and I’ve got some one-off transition anims (sighting player - from normal idle to combat idle; from combat idle to alert idle; various pain anims) and attack anims.

Should I shove all of those into the same montage (using different slots of course) and then blend montage with the final state (BP code will dictate what slot to use for particular one-off anim or attack combos) ?

For example, AI is in its normal state, idles or walks around. Then it stumbles over player and has to play “player sighting” anim before switching into combat state (which will have combat idle anim and so on). Once out of combat (for example losing sight of player), it will need to play combat-2-alarmed transition anim and go into alarmed state after that (with idle/walk anims for alarmed state). And during combat state when attacking player AI needs to play attack anims in various order, repeating same anim once or twice randomly (like, slash from the left, slash from the left, slash from the right, pierce, slash from the right, pierce, etc.)

Thanks beforehand

P.S. Draft anim set for this project:

https://youtube.com/watch?v=E8hyGsQqr6o

Yes, this seems like a very reasonable way to do this. Especially if your anim lengths are the same.

Anim lengths are not quite the same, but I’ll try this setup. Thanks.

@HosFross
​​​​​​​​​​​​​That didn’t work - no way to dynamically switch between slots in anim graph using BP :confused: Probably going to have to make another state machine with all those one-off anims or have everything in the same slot (not sure whether it makes any difference for this case).