How can I add the new animation I made and enable the input action?

So, I created a different animation by editing animation layers in UE. used a conduit to add it in the state machine. and added a new input under the project settings to enable the animation by using the “F” key. But I can’t seem to find the correct way to add it in the graph to enable the action input. anyone who can help me? thank you. :slight_smile:


There are various different ways how to do this.

You could get the anim instance of your skeletal mesh in your characters blueprint and from there you could cast to your anim blueprint and set a variable. For example in your Character BP:
MyMesh->GetAnimInstance->CastToMyAnimBP_Number1->Set_useFlashLight_variable …and then just do something with it in the AnimBP… either in the animgraph or the statemachine.

However … if you would use your (base) character blueprint for different characters with different anim blueprints then it’s not that cool if you have to add various casts for various different anim BPs at that place. Example:

You could even get the character blueprint in the anim blueprint. For example in your AnimBP:

However …if you would just get a bool that only changes if some input was done from time to time it would be a waste of performance to check and check and check again each tick.

You could even create a blueprint interface. Add a function like Set_useFlashlight with some bool input in the Blueprintinterface. Add the Blueprint interface to the “Class settings” (Details tab, Interfaces) of all your different anim blueprints and to your character blueprint (and any other blueprint you like) and do something like this afterwards:
CharacterBP: MyMesh->GetAnimInstance->Set_useFlashLight(Message)
AnimBP: Event_Set_useFlashlight->Set_useFlaslight_variable

Sorry, I’m not very good when it comes to the programmer side in UE. Can you point me in the right direction where I can see a tutorial on this?
Thank you.
I’m using 4.14 and I only have “skeletal mesh” instead of “Mymesh”.

The “skeletal mesh” is “MyMesh” :wink: … Probably take a look at the tutorial series of this guy: Unreal Engine 4 Blueprint Tutorials - YouTube - It shows you how to retarget a mesh for UE4 (which probably isn’t what you currently need) and continues with:

How to get your input from the character BP into the anim BP via blueprint interface.
How to create a aimoffset for third person (which would be very handy if you would create a flashlight anim anyway).
How to grab a rifle and how to put it back … using 2 sockets on your character. Which could be easily adapted for “grab flashlight” and “put back flashlight” instead.

thanks. :smiley: I can get an idea on how things work using this tutorial. Thank you very much.
I’m still new in regards to using UE.

Thank you so much iam also use the’s very well.