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.)
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.
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).
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.
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.