Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Playing animation for different items


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? (:

Product Version: Not Selected
more ▼

asked Aug 07 '14 at 05:02 PM in Blueprint Scripting

avatar image

6.8k 332 184 465

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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: https://www.youtube.com/watch?v=Dtewkn8qIE0 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 :)

more ▼

answered Aug 07 '14 at 08:03 PM

avatar image

5k 160 21 144

avatar image eXi Aug 08 '14 at 10:40 AM

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.

avatar image fighter5347 Aug 08 '14 at 03:13 PM
avatar image eXi Aug 08 '14 at 04:24 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question