Help with Anim Montage and enemy Hit reaction.

Hello.

I am trying to figure out how I set enemy hit animations/reactions based on where in an animation they are hit.

If I have say 3 different punches in a montage, how do I make an enemy react differently depending on which punch hit them?

Do I do this using Notify or something else?

Any help would be appreciated

I think in the case of the punch combo, you should set a notify to increase the punch index. Then you can use indexes to filter out the animation your enemy will play.
For example, if punch number 1 hit them, play X animation, if punch 2 hit them, play Y animation and so on.

Thanks for the reply. I figured it would involve indexs, however I’m not really sure how to set it up. How do I set a notify to increase my punch index then use said index to set the enemy animation?

Just create an index in your character or pawn BP named PunchStage or something like that with default value 0. Then in your AnimMontage set up a custom notify at the beginning of each different animation so it adds up +1 to the index on each passing animation or you can create 3 different notifies for each stage in the punch so each notify will set a different value to your index. Then you can just check that index from your enemy blueprint like this:

Get Player Character-> (drag link) -> Cast to MyCharacter -> (Drag As My Character) -> Get PunchStage -> == 0 ->Branch->True -> Play Animation X
-> == 1 ->Branch->True -> Play Animation Y
(… and so on)

For animation notifies, check this:
Animation Notifies in Unreal Engine | Unreal Engine 5.3 Documentation (Check the Custom one)
Crash Course in Animation Notifies - Unreal Engine
Animation Montage in Unreal Engine | Unreal Engine 5.3 Documentation