Pick up Item Error Fix?

Update on my post from earlier:

I found a video that will allow me to pick up the item the way I was hoping for.

But I got an issue. I did exactly what the youtube video:
Picking Up And Moving Objects | Inspect Item Part 1 - Unreal Engine 4 Tutorial - YouTube says. (Go to 23:45 to see what the it’s suppose to SUCCESSFULLY do)

When I walk up to the item, it’s suppose to do an pickup animation, and when I click on the button again, it’s suppose to drop the item where my character currently is.

If ANYONE can help I would be so appreciative!

1 Like

Did you give the actor the tag ‘interactable’?

Hey ClockWorkOcean!

I didn’t, so I added it to the item and it FINALLY WORKED! YOU ROCK!

But I did come across one more small error I hope you could help me fix.

Great :slight_smile:

Not sure about the drop functionality, the BP is bit ‘spaghetti’. I would go back over the tuut, and see if you missed something. Or put some debug code in ( just print string ‘I’m here’ ), and find out what’s going on.

Okay :slightly_smiling_face: Thanks again for the help though.

I will go back in the video and check for any mistakes, but if anyone else has a solution to the drop item mechanic isn’t working, please let me know!

Otherwise I will end this post with the solution you gave me!

Thanks again ClockworkOcean! :wink:

1 Like

Hey again.

I just checked the video and rewatched the section where he begins the BP of dropping down the item anywhere, but I did everything right, so there must be another issue.

I also found a problem where if you pick up one gas can, but press E and you can’t drop it, but if it’s towards the other Gas can, it works fine.

Take a look.

Can you isolate and show the ‘drop’ code?

I don’t entirely remember what part of the entire BP is the drop mechanic for my character.

The youtuber did mention the section, and i thought that was the part for dropping the item. I’m not sure.

I’m gonna go back to the video and try to find the spot where he mentioned it, but i recorded the entire BP code in my first post above. If you are able to try to find the spot yourself, that would be awesome.

Also, I don’t have a Drop button in project settings. I have an Interact button that’s ‘E’ key, i thought the bp also included ‘E’ for dropping an item as well.

1 Like

Ok, it’s a bug in the code.

This bit

means you can only get further into the code if you have clicked on an interactable actor.

Which you do when you click on the can, but generally speaking, you don’t, because you’re holding it.

0/10 for YT… :smiling_face:

I wonder if you can post a pic of the BP here, it’s too fiddly to see what’s going on in the vid.

Here you go! Hope this helps.




Try putting a custom event called ‘drop’ here

image

connected as well as what’s already there, like this

image

and call it here

like so

I think that will force the drop, but might have other side effects.

Another possible place ( instead ) is here

image

If that all fails, you can just copy all the code ( select all the nodes and CTRL-C ), and paste it here

Then I can check it out.

I tried to do what you did in the BP, and it instantly dropped the item after picking it up. But I pasted the BP to the link you sent me.

1 Like

I’ve loaded the code, it does work, but the way it works is TOTALLY weird.

Why on earth this guy set it up like this, I have no idea.

When you click to put down, it does a line trace ( which you don’t need ) and the blueprint relies on that trace hitting the object you’ve picked up.

So, you need two things for that to work

  1. You need collision set to ‘block all’ on that can mesh in the blueprint.

  2. You need the arrow component position to be directly in front of the camera, otherwise the line trace to put down won’t hit it!

It’s FIXED!!

Had to make a few adjustments on the position of the arrow so not only the gas can is not right in the characters screen, but also in a position where I can still click ‘E’ with it working still.

You’re welcome :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.