How Do I Make The Character Play His Animation When He Picks Up An Object?

Hello,

I am using Unreal Engine 4.10 and I want to create a Blueprint that would allow my character to pickup or grab the object and have it in his pocket or back while he plays a animation for it. I have been trying to find a source page that explains about it but so far, I had found none. (Not this is for a third person game I want to make.)

This is the example I mean: link:(Unreal Engine 4 Physics Pickup System Blueprint - YouTube)

It would be awesome to if you show a screenshot of the blueprint and explain how it’s done.

Thanks,

One way;
On the object you want to pick up, add a collision volume, set the collision presets to “overlapalldynamic” (or custom, and just pawn). You can then do a “OnComponentBeginOverlap (CollisionVolumeName)” node in your event graph, that enables the user to press a button to pick up the item.

Then just have the button press play the associated animation on the player, destroy the actor on the ground, and equip/do whatever to the item for the player.

Is it okay if you show me a screenshot of it in Blueprint please?

Sorry, seeing something visual normally helps me.

Should be something like this;

This will enable the user to apply any input we later specify, while they are overlapping the listed item (A collision box named P1_Interact in this case).

116384-overlapinput.jpg

Then we specify an action on key input (Play an animation on the player, and then call a function on the player to do something when they hit the E key)

Both of these go on the object the user is interacting with. Then with the function for equipping the item or whatever would go where it makes the most sense.

I see, I’ll try it out and hope that this would work.

I will let you know when my issue is solved from your solution.

Thanks

Long time, sorry for the late reply but there is no “Set Player Stats” anymore in Unreal Engine 4.13.

Yes, like I mentioned and as you can see in the image, it is a custom function. That is where you would put whatever action you want to occur after the animation plays.

Oh I see, sorry I just had never seen a Custom Function in this style you did. That I do not know how to do it, plus I keep having this warning sign whenever I try to “Cast To” my Player Blueprint.

What about the “Enable Input” and “Disable Input” functions? Where do they branch off too?

Sorry, it’s been like a long time I lasted used Unreal Engine 4 and I am currently trying to get my memory back.