I use a blend poses by enum and each kind of weapon have its state machine.
Soo Only changed the enum and fire the equipment animation saving code and flag variables.
sooo If I will have a exit node, I will fire also the unequip animation saving again code and flags variables. ( I put a draw to balance my lack of english :P)
sooo If I will have a exit node, I will fire also the unequip animation saving again code and flags variables. ( I put a draw to balance my lack of english :P)
There are a few ways around a need for an exit path like this. I’m attaching a blank project(see the end of the post) with some animations that I yanked from ShooterGame.
What I’ve done is created an AnimBP (Solution2 in the project) that achieves the “Unequip” action in the way I believe you want it to work (in my example, it’s simply the Equip anim played in reverse as ShooterGame has no Unequip anim)
If any of this doesn’t make sense, let me know and I can help out. If anybody has a more elegant solution, please feel free to show me up!! I welcome it.
Blend inside each state:
*Enum Value 0 is the Rifle and Enum Value 1 is the launcher.
*
TL;DR The following **EventGraph **setup momentarily ticks **bIsUnequiping **to **true **whenever **WeaponEnumVal **changes, causing the State Machine to transition to the Unequip Animation.
In the Event Graph, I’ve set up a system that sets bIsUnequipping to true whenever the WeaponEnumVal byte variable changes. It does this by storing the persistent value of **WeaponEnumVal **in a temporary variable called WeaponEnumVal-Old, then updates WeaponEnumVal-Old to match WeaponEnumVal after the other operations are complete.