Playing animation for different items

Hey,

i got an Inventory and made a FirstPerson Mesh with 3 simple test animations (Idle, Idle_Axe, Attack_Axe)

I made a socket for the right hand and attached a staticmesh to it.
What is the best way to use different animation?
i can check in the EventTick of the player, what he is holding and play different Animation, but i don’t know how to apply something like the Attack_Axe.
My setup is, that i press the LeftMouseButton to perfom any action related to the ItemType. If its Food, i want to play the Eat animation, for Water the Drink Animation and for an Axe the Attack_Axe animation.

But since my Eventtick is playing the Idle, i can’t “override” the idle. Do i have to work with Booleans in the Tick?
Something like “bNewAnimation” and setting it to false if i change the ActivItemSlot and to true after the NewAnimation was player (looped)?

What is the best way to handle this? (:

When I understand you right you want to play an eating animation when the player eat’s something and a drink animation when he drinks?

  1. add a bool variable into the character bp (e.g eating)
  2. now go into the item bp and there you have to change the eating bool to true when the player picks the item up (cast)
  3. now go into the anim bp and enable another bool with the eating bool
  4. now add the states and enable it with the bool variable

Here is a tutorial: So basically you have to create a normal animation bp (like in the third person bp template) and then you can enable the different animations with a bool in the main character. That’s the easiest way to handle this :slight_smile:

That is working so far, thanks!
I got another question related to this:

Is their a way to weight animations?
So that i have a basic running animation and different animation that only effect the upper part of the body. So if i activate the upper body animations, the lower body shouldnt be effected and play the running animation.

Take a look at this and the following tutorials:

Uh, there was a tutorial series about it. My bad (: Thank you!