checkout Blend Poses by Enum and maybe some other from Blend Nodes | Unreal Engine Documentation. So you can create enum, keep it in your Pawn and select Anim state machine based on that
I use animation graphs and pull the variables into the event graph in there from the weapon. I set the states for each animation such as reloading, firing, chambering, idle, etc, then tie them all to the booleans of similar names to enter or exit the states. Then when doing any of those certain things, I call a ‘cast to’ on the reference of a weapon in player character to the parent of the weapon equipped and set the state of the booleans so it passes to the animation graph.
Ex. If player shoots, get currentEquippedWeaponRef > Cast to parentWeaponBP > Set Firing?:True
From here, the animation graph is checking for ‘Firing?’ on a tick and will enter the firing state animation. Just make sure on each child BP that you select the specific AnimGraph.
The reason I specifically state the parentWeaponBP and not the actual class is that if you make a parent with those booleans ‘Firing?, Idle?, Chambering?, Reloading?’ then you can make children of it for each weapon you have and dynamically update those child classes from the parent class as for example a pistolBP’s Firing? isn’t the same as a rifleBP’s Firing? but casting to the parent will allow the passthrough to any of the children.
Just don’t make new booleans for these child bp’s as they won’t be seen in the variable pane on the left but they can be called on if you do ‘Set Firing?:False’ on Event Construct.