Play animation and return to idle/walk/run

Hi! I’m sure this one will be an easy one :slight_smile:

So what I am attempting is to make a character pickup a ball on the ground. I have started off by using the 3rd person game template.

So I created the ball and put a box trigger around it. I set up an event in the level blueprint that handles when my character overlaps with the balls trigger sphere, so it pops a message on the HUD saying “Press F to Pick Up”. From here, I need to make it so when the character is within the trigger sphere AND presses F it will play the ‘Pick Up’ Animation Sequence I’ve created.

In my efforts I’ve managed to get it working to the point where my character plays the animation, and then no longer returns to the idle/run/walk state and begins gliding around. But forget that I mentioned that, because I deleted all my attempted code for a fresh start.

So, my question is, what will I need to put in which blueprint to achieve this?

Just on a side note, please don’t link me to the set of youtube tutorials by Unreal Engine, because I assure you I have watched them - twice, and those tutorials are slightly different to what I’m attempting to achieve today, but is enough to throw me off. I’m new to UE4, and after following many tutorials I’m starting to be able to do stuff on m justy own now - just - this has me stumped :stuck_out_tongue:

I intend to make the character throw the ball afterwards, but I should be able to work that out for myself after I get the pick-up working.

Thanks in advance for any help :slight_smile:

It sounds like you got most of it working already. If you’ve already watched all the common tutorials, you probably used a combination of an Animation Blueprint (AnimGraph, state machine), a Trigger Box, and Input setup, which sounds perfectly okay.

One thing that stumped me when I tried something similar is that the PlayAnimation node appears to be buggy. At least, I also was unable to get the character to return to their Animation Graph behavior afterwards.

To work around that, you can do the following:

  1. create an Animation Montage (for your character skeleton)
  2. drag your pickup animation into that
  3. in reaction to the Pickup event, use the Play Anim Montage node instead

The answer was solved here: Simple animation and then resume idle/walk/run - Character & Animation - Unreal Engine Forums