Creating a Draw and Sheath from single input with State Machines (BEGINNER)

Just to note this is my first time using Blueprints and State Machines within Unreal so I am sorry if my terminology isn’t what’s generally used.

I’m currently a student with an assignment coming up to set up self-made animations within Unreal Engine 4 using blueprints and state machines. The base we have to cover is an idle, walk and run animation which I have managed to set up correctly and all works well. However, I also wanted to implement another set of idle, walk and run animations that slightly differ to the first set and are toggled through a draw and sheathe animation.

In my mind, this would work through having an input (preferably number 1) set a variable to either true or false which would then command the state machines when setting up the transition rules. Through a lot of trial and error I haven’t been able to get close to this working at all as it seems as though the character blueprint stops communicating with the animation blueprints whenever I try to set up variables, however I don’t have very good knowledge of how to set this up generally. (I have attached an image of my state machine)

The problem here is I am unable to follow tutorials online as most follow a process of having the weapon separate to the character’s rig, however the character I do have has the weapon as part of the rig - so I assume this method will not work. Additionally, the weapon is part of the animation already with the first set of general animations having the weapon sheathed on the back, and the second set of animations having the weapon held in the character’s hand. I don’t necessarily want to recreate all of the animations to have the weapon separate as I am coming close to my deadlines.

I appreciate if this comes across confusing, I am still learning.

Hi @xFallenAngel93x

In general what you want shouldbt require changing the weapon to a seperate actor as long as your animations work how you want then its just the logic you require.

I simple form:

Create a variable i your animation blueprint called isDrawn.

In your transitions between states you need to do a check on this variable before allowing the transitions. So isDrawn is true then transitionto the correct state. If False allow the reverse transition.

Then inside your character have a matching variable that you can set using input.

Back in your animation graph “update animation” cast to your player bp, and get the status of the variable from your character and set it to the isDrawn variable in the animation blueprint.

Its sounds complicated but its not.
Im not at my computer right now, but if it was hard to understand i can always post you some images later.