@@evensteven4367The Sequence node helped me to get this working: We're supposed to build this pick up code in the "BP_ThirdPersonCharacter", starting with an "EventBeginPlay" node, but that's *impossible* due to the fact that there already IS one of those at the existing "Add Input Mapping" section. The workaround is to connect that original 'Event BeginPlay' to a Sequence node: Once you set it up, make sure the "Then 0" goes to our new pick-up code, and the "Then 1" connects down to the original "Cast To PlayerController".
@@TheDay53 The very first node in the ThirdPerson BP (in my 5.1, at least) is the "Add Input Mapping" section, which starts with that much vaunted "EventBeginPlay"---which links directly to it's own "Cast To Player Controller". When we interrupt that wire with the Sequence node, the "Then 1" will re-link to it's "Cast To player Controller" ('Then 0' links to this pickup thing we're doing here).
To anyone having a problem picking it up while physics are enabled, Make sure that your Static Mesh is the RootComponent in the blueprint, and not attached to a DefaultSceneRoot. That solved the problem for me:) Great Tutorial!
At 13:28 you add a "Set Actor Location And Rotation", but this is not necessary at all. Just set the "Detach From Actor" Location Rule, Rotation Rule and Scale Rule to "Keep World". Then it will not teleport upon dropping, but just naturally drop it as if you just let go of it with your fingers.
probably the best tutorial for picking up/ dropping items not to mention that the code is easy to understand. other tutorials have unnessecary code and seem to overcomplicate things
@6:53 get pistoloverlap doesnt show the same for me it says target then a box that says self and pistol overlap. I cant connect them because it says 'object reference is not compatible'.
i had the issue, the player could not collect the item. The solution was the "Event begin play". It already exists and is connected with other functions. I tried to copy it, but it didn´t work though. Solution: simply connect the existing "Event Begin Play" directly to the the "Get All Actors of Class" from this tutorial. It worked for me. Thanks for your video. I used it with a collectable lantern, that you can pick up, light the rooms, and put it down when i needed to fight...
This system works perfectly when single player but In multiplayer I can only get the item to pickup on one screen and it stays in the starting place on the other screen (they aren't synced). I tried to replicate it the same way I've been replicating everything else but have no success. Is there anyway someone can help?
Really cool tutorial. Recently began to play (again, after many years) Doom. This reminds me of this game. Just the difference is once picked up, it is in backpack, then we can choose which weapon to use, depending of ammo.
At 7:04, I am unable to get the static mesh. I have saved and compiled both the character and item blueprints. The only thing I can think of is that I was unable to set a new event begin play, so attached the line of code to the end of the existing one. That is likely what is messing it up but I don't know how. Any feedback appreciated
I was having the same issue, but then i read another comment saying that you have to make a blueprint from the static mesh itself (not making a blueprint, and then adding the mesh in the viewport). when you do it this way, the default root will be called static mesh, which is what you end up adding in the event graph. i have found that the code will not function properly if you don't set up the blueprint this way.
Hey thanks for the great tutorial, and it work perfectly. I just have one question, if i wanted to make it launch a couple feet in front of the player how would I do that?
To achieve that, you can follow these steps: 1. Get the trace end vector output pin, which can be found on the trace line. 2. Obtain the location of your character mesh using the appropriate node. 3. Use the "vector distance" node to calculate the distance between the trace end vector and the character mesh location. 4. Based on the value obtained from the "vector distance" node, determine whether to launch the character forward or backward. 5. If the distance value suggests launching forward, use the "launch character" node to propel the character in that direction. 6. If the distance value suggests launching backward, use the "launch character" node to move the character in the opposite direction. By following these steps, you should be able to achieve the desired effect of launching the character either forward or backward based on the calculated distance.
I got a error: Blueprint Runtime Error: "Accessed None trying to read property Pistol". Node: QBranch Graph: Q EventGraph Function: Q Execute Ubergraph BP Third Person Character Blueprint: QBP _Third Person Character
Great tut! though i still have this odd bug unfixable and dont know why: the attach visual won't work for me, just like you vid, i set simulate physics default to be true, then set it to false (successfully set , cos i can see a print string during play) before attach, but the mesh is still not attaching. any idea?
so i use ue5.5 and i've tried to implement the same logic for a project of mine, but i have a problem. The logic goes like this. on left mouse button pressed, shoot line trace by channel and on hit that implements interface, set simulate physics to false and attatch actor to component. on release of left mouse button, set simulate physics to true and detach from actor. it works fine. but only once. the second time (as soon as the simulate physics is set to true the first time) the object will not change location no matter what. i've tried set actor location and it didnt move at all. it just enables and disables the physics simulation without moving the object. any idea on how to fix that? i've tried so hard yet no solution. i've thought that it might be a bug in ue5.5 but im not sure. any help would be highly appreciated!
What's a good way to pick-up and drop more objects in the environment. Tried to set a number to an array but has not worked. But otherwise, I agree with other comments about it not being too much of a hassle. I am using Poke balls as an easter eggs to throw around in the level. But I am only picking up one of them. I want the option to drop and pick up the other.
I replaced the Get (a copy) array section with OnComponent BeginOverlap (CapsuleComponent) -> Cast to BP_Pistol -> Set Pistol And then i also set the relative scale 3d and material after that so they don't reset after you pick them up
Hey I was having trouble at 5:21 went I went to put in Event begin play it just took me to the other one on the third person and I could not spawn it any thoughts?
@@LocoDev I ended getting it fixed and it works perfectly now :) I just restarted, I also didn't end up using the 1st person weapon, but do you know how I could get it to be picked up like a static mesh?
for me after attach collapse nodes thing it didnt work branch with attachpistol it worked when i put drop input action to detach from actor but when i try to make so it can fall(Set actor location and rotation) it also didnt work please help
The "Accessed None trying to read property" error typically occurs when your code or blueprint is trying to access an object or property that is not valid or does not exist. This can happen if the object was not properly initialized or if it has been deleted. Drag and drop the blueprint to the world and try again let me know if it works You can also use the spawn actor from class then choose the blueprint of the pistol
Hey, first of all, great videos and very well explained. The link to download (Google drive) the gun does not work. File not available ;-(. Can you fix that?
Hello, that was a realy good tutorial. Thank you! Can you make a video where the player can deattach a car door and attach it back? (or engine or anything to something)
@@LocoDev I wanted to make a mechanic to pick up an item and when I went to pick up another item in the scene, the one that was already with the character would automatically drop. Allowing you to pick up only 1 item at a time as in some horror games, could you make a video with this mechanic?
my problem is that when I drop a physic item, it sometimes goes through the floor. If I activate CCD, it won't go through but will dance crazily, fly, rotate...
I put a print sting at the very end of the chain and it even says "pistol attached" (what i wrote there) but still the pistol is on the ground and not on my character
Finally a fix that took me less than a hundred years to do : I think the issue is that i created a blueprint for the pistol and THEN put all the meshes inside, decided to follow you step by step and right click on the mesh and create a blueprint from it, did all the needed changes for the "new" additions and it finally works, pistol goes to the socket of my character
Hiya does that work for unreal engine 4 as well btw very nice tut I have been looking for something. that actually explain how it's done and u have done that thanks
@@LocoDev First off thanks for the quick answer it works now, theres just one thing i dont get cause when i pick up the gun it picks it up in the wrong angle and not the angle that i laid the gun in the characters hand any idea?
@@dimkasnusmumrik2548 the reason is because the duplicate of the object is acting as another blueprint, which can be seen when you want to see the blueprint running when testing. So because of this, the code is looking for the original static mesh and other components, not the blue print. There’s another tutorial which allows you to use duplicate and pick up but you can’t drop the item :/ hope it helps :)
It isn't working for me. An error comes up that says nothing was found when trying to find my object variable. I noticed that when you create your pistol object variable, it has the blueprint icon next to it. No matter what I do I can't seem to get any object variable to do that. Any thoughts?
@@LocoDev At 5:44 you promote the copy to a variable and it shows up as an object type variable. I looked up documentation and it seems like it should do that but for me it doesn't show the blueprint icon and it returns "none" when I run it.
And 12 hours of trying later I realized I still had the mesh of the object in my level, not the blueprinted one... No wonder it kept returning "None"... Well thanks for your tutorials, they're great!
@@ridgebingaman3848 oh, great. The BP needs to be in the world, you can also use spawn node to spawn ur BP I. The world so you don't need to place it In the world before:)
First of all, thanks! I got some questions tho...once you turn on physics and the item lays on the ground, how would you pick it up again. Because for some reason I cant pick up a physics actor again. It will only pick up objects which have physics turned off. Also is there a way to make the item drop straight on the ground and not with the force of the character moving and flying off somewhere else?
The physics can be turned either on or off When the Umbrella (actor) is on the ground Before picking up, turn off physics if it's on. >> Set simulate physics and reference the umbrella on the target I think. You want the item from your hand to be dropped straight to the ground, I would calculate the current Z velocity which is the value that shows the current height regardless of where the character is. Calculate your character Z Velocity and get the location of the umbrella and detach it from your character but before subtract the z value by the value of the current value of the character. Or a better way to do this would be with a line trace pointing straight down. Then on the node of the line trace I would get the hit location of where the line trace hitted and use this information to use it on the location of detach node.
In this case a line trace would be perfect for this, I recommend you study about line traces, it's pretty useful for most coding process in general. ua-cam.com/video/yBmPxGHu3uo/v-deo.html docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Tracing/HowTo/SingleLineTraceByChannel/
Hey Loco, Great video followed it through works great as well lol. Now, as after this I started to implement throw system it seems to be working like idk goes all over the place. Could you give me a few pointers to right direction haha thanks and keep making videos!
is it possible to add multiple Items? It doesn't look good if i remake this code everytime for every item. Can i put this code in every Item Blueprint i want to?
If you want to obtain specific items, you can try learning how to use tags and tag the items that you want to be able to pick up. If you want to obtain multiple items, you need to write some code to first check whether the last item you picked up is already in your hand, before attempting to pick up a new item.
Hey, im having an issue. So the tutorial worked, but once i drop the object, then try to pick it up again, the object disappears. Do you know what is causing this?
@@LocoDev Yeah, but I need it to be skeletal since I have animations on it. It gets attached to component but not on correct socket and it doesnt disappear from the ground, I suspect it just attaches and stays there unable to follow the character
@@LocoDev I fixed it, if anyone is having issues with skeletal mesh what you have to do is go to create blueprint class Actor, then add skeletal mesh and then drag that skeletal mesh on top of scene root that automatically generates inside of actor bp, that way you will replace it and enable the sk mesh to stick to your characters sk mesh
@@emptybruh Хочу добавить что тоже столкнулся с такой проблемой, можно из к Parent вызвать get actor owner component и указать туда скелетал мэш (use translate)
Hi LocoDev, Thanks for for your great work! I followed your tutorial one by one but I have one issue. The 'Event BeginPlay' is already used by the Input Mapping. I can't get two of them and I think that's the reason why it is not working. Do you have any Ideas what I can do? Thanks
If the 'Event BeginPlay' is already used by the Input Mapping, you can try the following solutions: Rename the Input Mapping Event: You can go to the Input Mapping Event and rename it to something else that is not already used by the 'Event BeginPlay.' This should allow you to use the 'Event BeginPlay' for your purpose. Use a different Event: If you can't rename the Input Mapping Event, you can use a different event that is not already used by the Input Mapping. For example, you can use the 'Event Tick' or 'Event ActorBeginOverlap' events. Combine Events: If you need to use both the 'Event BeginPlay' and the Input Mapping Event, you can try to combine them into one function. You can create a new custom event, and then call the 'Event BeginPlay' and the Input Mapping Event from within that custom event. Use Blueprint Interfaces: If you need to have multiple events in your Blueprint, you can try using Blueprint Interfaces. A Blueprint Interface allows you to define a set of events that can be implemented by any Blueprint that uses that interface. You can create a Blueprint Interface that includes both the 'Event BeginPlay' and the Input Mapping Event, and then implement that interface in your Blueprint.
this is great, exelent work, how you explain is incredible, i have a small problem after i pick up the gun the character does not walk properly, is only me? or did mess something lol
Awesome tutorial. Trying to make it so the player is able to pick up the same actor in both hands at the same time (just the actor place in the world twice). There seem to be some priority issues as when I have the same actor in the world twice only one can be picked up? Do you have any idea what might be happening?
Just to make it a bit more clear hehe, the issue boils down to that whenever I have more than one copies of the actor in the scene, only the latest placed actor is "pick up-able". I have unchecked "consume input" on my action-event (keypress E).
Can I use this for different items I mean it's ok now I can pick up a pistol but can I use this blueprint to pic up a box for example ? cuz I tried to duplicate the blueprint and changed the static mesh from pistol to box but it didn't work!
😭😭😭 doesn't work because "event beginplay" is already used, its a basic code for fonctional the game i believe.. and i don't know what i do (sorry my english)
Hi LocoDec, very nice tutorial, thankyou. I don't suppose you would be able to show me how to do this with a linetrace? I have tried to combine your tutorial with another tutorial and made my own blueprint to attach items to character sockets, however when Simulate Physics is enabled on the objects, they no longer react to the player? ua-cam.com/video/O-JykXxxRjI/v-deo.html I've been asking everywhere for help so i figured I might ask here as well!
are this problem already solved? i already following 3:18 too, when i check simulate / and mass, the object not moving, but when i uncheck both of them, i can move the object
@@igmap3892 Hi, for me it was an issue with the 'sceneroute'. My actor was the child of another actor and i think the parent actor's physics was overriding the physics of the one i wanted to use. If not that just look at the physics of your scene route and perhaps make your mesh obect the route of the scene in the bp. If this doesnt make sense just lemme know and ill try and explain it better
if anyone is wondering, you can add a "sequence" after "Event Begin Play" to add multiple items to be picked up and dropped
I'm stuck, can you explain further
@@evensteven4367The Sequence node helped me to get this working:
We're supposed to build this pick up code in the "BP_ThirdPersonCharacter", starting with an "EventBeginPlay" node, but that's *impossible* due to the fact that there already IS one of those at the existing "Add Input Mapping" section.
The workaround is to connect that original 'Event BeginPlay' to a Sequence node: Once you set it up, make sure the "Then 0" goes to our new pick-up code, and the "Then 1" connects down to the original "Cast To PlayerController".
@@heavenseek Could you please tell how to do so more specific? Sequence got it, Then 0 got it, but do you mean Then 1 should be connected to where?
@@TheDay53 The very first node in the ThirdPerson BP (in my 5.1, at least) is the "Add Input Mapping" section, which starts with that much vaunted "EventBeginPlay"---which links directly to it's own "Cast To Player Controller". When we interrupt that wire with the Sequence node, the "Then 1" will re-link to it's "Cast To player Controller" ('Then 0' links to this pickup thing we're doing here).
@@heavenseek got it, thank you!
To anyone having a problem picking it up while physics are enabled, Make sure that your Static Mesh is the RootComponent in the blueprint, and not attached to a DefaultSceneRoot. That solved the problem for me:) Great Tutorial!
Thank you so !!!
thx bro .....
holy shit, thank you so much! been ramming my head into the wall trying to figure out why it wasn't working for me. you are the goat!
Thank you so much.
❤
At 13:28 you add a "Set Actor Location And Rotation", but this is not necessary at all. Just set the "Detach From Actor" Location Rule, Rotation Rule and Scale Rule to "Keep World". Then it will not teleport upon dropping, but just naturally drop it as if you just let go of it with your fingers.
After 4 videos from 4 different people and the BP not working, I finally found your video and now it works. Thanks a lot.
probably the best tutorial for picking up/ dropping items not to mention that the code is easy to understand. other tutorials have unnessecary code and seem to overcomplicate things
You have no idea how long I’ve been looking for this tutorial. Thanks bro.
haha now you found it!
This was the best video I've ever seen from Enreal Engine❤
I'm doing this in first person, this is the only tutorial that worked, thank you so much
Thank you, yes. OMG. I have been stuck trying to do this for 3 weeks. You are a life saver. Thank you.
@6:53 get pistoloverlap doesnt show the same for me it says target then a box that says self and pistol overlap. I cant connect them because it says 'object reference is not compatible'.
Thank you! This has been something ive been struggling finding a proper tutorial for!
Now I can use this however I need :3
Finally, someone who got this working for 5.1 without bugs! Thank you! Subbed!
for posterity, if your player is already using event begin play add Sequences in blue prints
i had the issue, the player could not collect the item.
The solution was the "Event begin play". It already exists and is connected with other functions.
I tried to copy it, but it didn´t work though.
Solution: simply connect the existing "Event Begin Play" directly to the the "Get All Actors of Class" from this tutorial.
It worked for me.
Thanks for your video. I used it with a collectable lantern, that you can pick up, light the rooms, and put it down when i needed to fight...
Hi! your tutorial is really good but I'm trying to make a Multi game. How can I replicate the system you created?
This system works perfectly when single player but In multiplayer I can only get the item to pickup on one screen and it stays in the starting place on the other screen (they aren't synced). I tried to replicate it the same way I've been replicating everything else but have no success. Is there anyway someone can help?
Good lesson, but how can I adapt this for other subjects? It is impossible to repeat all this for each subject separately.
starting at 10:05, did not mentioned or show how it was been fixed.
Really cool tutorial. Recently began to play (again, after many years) Doom. This reminds me of this game. Just the difference is once picked up, it is in backpack, then we can choose which weapon to use, depending of ammo.
the only tutorial that i could find that worked! thanks so much
glad it worked !!
At 7:04, I am unable to get the static mesh. I have saved and compiled both the character and item blueprints. The only thing I can think of is that I was unable to set a new event begin play, so attached the line of code to the end of the existing one. That is likely what is messing it up but I don't know how. Any feedback appreciated
Update: I have fixed the event begin play issue using a sequence node, but the issue persists.
same issue, I just don't have get static mesh when trying to add it as a node. Did you get it resolved ever?
I was having the same issue, but then i read another comment saying that you have to make a blueprint from the static mesh itself (not making a blueprint, and then adding the mesh in the viewport). when you do it this way, the default root will be called static mesh, which is what you end up adding in the event graph. i have found that the code will not function properly if you don't set up the blueprint this way.
@@auroradickerson339 that's so stupid..but thanks
Hey thanks for the great tutorial, and it work perfectly. I just have one question, if i wanted to make it launch a couple feet in front of the player how would I do that?
To achieve that, you can follow these steps:
1. Get the trace end vector output pin, which can be found on the trace line.
2. Obtain the location of your character mesh using the appropriate node.
3. Use the "vector distance" node to calculate the distance between the trace end vector and the character mesh location.
4. Based on the value obtained from the "vector distance" node, determine whether to launch the character forward or backward.
5. If the distance value suggests launching forward, use the "launch character" node to propel the character in that direction.
6. If the distance value suggests launching backward, use the "launch character" node to move the character in the opposite direction.
By following these steps, you should be able to achieve the desired effect of launching the character either forward or backward based on the calculated distance.
Thank you for the tutorial, been searching for it for a long time.
It doesn't seem to want to pick up the items
my character cant pick up the pistol eventho the branch is already false 10:48 help plz
I got a error:
Blueprint Runtime Error: "Accessed None trying to read property Pistol". Node: QBranch Graph: Q EventGraph Function: Q Execute Ubergraph BP Third Person Character Blueprint: QBP _Third Person Character
any fix on this? im having the same issue.
Great tut! though i still have this odd bug unfixable and dont know why: the attach visual won't work for me, just like you vid, i set simulate physics default to be true, then set it to false (successfully set , cos i can see a print string during play) before attach, but the mesh is still not attaching. any idea?
is the gun in the world? did you get the right name of the socket of the mesh?
so i use ue5.5 and i've tried to implement the same logic for a project of mine, but i have a problem. The logic goes like this. on left mouse button pressed, shoot line trace by channel and on hit that implements interface, set simulate physics to false and attatch actor to component. on release of left mouse button, set simulate physics to true and detach from actor. it works fine. but only once. the second time (as soon as the simulate physics is set to true the first time) the object will not change location no matter what. i've tried set actor location and it didnt move at all. it just enables and disables the physics simulation without moving the object. any idea on how to fix that? i've tried so hard yet no solution. i've thought that it might be a bug in ue5.5 but im not sure. any help would be highly appreciated!
What's a good way to pick-up and drop more objects in the environment. Tried to set a number to an array but has not worked. But otherwise, I agree with other comments about it not being too much of a hassle. I am using Poke balls as an easter eggs to throw around in the level. But I am only picking up one of them. I want the option to drop and pick up the other.
I replaced the Get (a copy) array section with OnComponent BeginOverlap (CapsuleComponent) -> Cast to BP_Pistol -> Set Pistol
And then i also set the relative scale 3d and material after that so they don't reset after you pick them up
poderia fazer um video de como carregar uma caixa e depois dropar pra poder subir nela?
Hey I was having trouble at 5:21 went I went to put in Event begin play it just took me to the other one on the third person and I could not spawn it any thoughts?
nvm
ok lol
Whathappened I have same issue xD
Same here
If the character wasn't walking properly after picking up the pistol for the second time, change the "set collision enabled" node to physics only.
how was the item outputs created at minute 12:03 please help me
Thank you for making this tutorial. Love it.
when i import the gun it comes in many pieces how do i fix this ?
I'm at 7:15 and I can't get a static mesh, I'm using the first person weapon for this, do you know of any fixes?
hmm, maybe try compiling other blueprints
@@LocoDev I ended getting it fixed and it works perfectly now :) I just restarted, I also didn't end up using the 1st person weapon, but do you know how I could get it to be picked up like a static mesh?
@@OfficialFutureRoyale from the content browser, drag and drop the static mesh to the Char BP event graph, you're going to get the node
@@LocoDev there seems to be no static mesh for the 1st person weapon, but I dropped the BP for it into the Char BP event graph
Instead, could you use right click to drop it?
Yes ofc
Hello nice tutorial ! except my item starts fall of the hand after picking up and flying kinda 😀
for me after attach collapse nodes thing it didnt work branch with attachpistol it worked when i put drop input action to detach from actor but when i try to make so it can fall(Set actor location and rotation) it also didnt work please help
i'm getting a blueprint runtime error after trying to pick my item up, it's saying "accessed none trying to read property" i have no clue what to do
The "Accessed None trying to read property" error typically occurs when your code or blueprint is trying to access an object or property that is not valid or does not exist. This can happen if the object was not properly initialized or if it has been deleted.
Drag and drop the blueprint to the world and try again let me know if it works
You can also use the spawn actor from class then choose the blueprint of the pistol
After I picked up the gun for the second time, it caused the character to jump back too much. What could be the problem?
The pistol might have spawned with the wrong collision presets
Hey, first of all, great videos and very well explained. The link to download (Google drive) the gun does not work. File not available ;-(. Can you fix that?
I'll try to, but you can try searching it on sketchfab
When I drop the something it disappears I still van get it from the same place but it disappear so please answer me
I've made a new system: ua-cam.com/video/SewKIpzICyc/v-deo.html&t
dosent let me pick up just says accessed none trying to read properly pistol, so idk what I did wrong lol
Hello, that was a realy good tutorial. Thank you! Can you make a video where the player can deattach a car door and attach it back? (or engine or anything to something)
I can only collect the last object added to the scene
which part of video
@@LocoDev I wanted to make a mechanic to pick up an item and when I went to pick up another item in the scene, the one that was already with the character would automatically drop. Allowing you to pick up only 1 item at a time as in some horror games, could you make a video with this mechanic?
@@adriandeoliveirabarros900 you mean pick different weapon system, yeah I can make a tutorial, but this should be fairly easy,
@@adriandeoliveirabarros900 just detach the current weapon and attach the other
@@LocoDev yes i really can't do this and i'm going crazy for not doing something so simple, any help would be greatly appreciated
anyone know how to throw the object?
you got any idea on how to have it work on all actors of that class with a tag
Sorry, have what work?
@LocoDev so instead of picking up every physics object you can only pick them up if they share a tag
Does anyone know how I would do this with (look / linetrace) instead of box collisions? they are so clunky xD
at min 6:47 i dont get the pistol overlap
Compile your pistol bp
When I drop the object after picking it up I can pick it back up again without colliding with it, does anyone have a solution to this?
my problem is that when I drop a physic item, it sometimes goes through the floor. If I activate CCD, it won't go through but will dance crazily, fly, rotate...
Very Useful. Thanks A lot
i dont have Static mesh its not in my list 7:03 so what do i do?
se você estiver usando skeleton mesh não irá conseguir encontrar a staticmesh
You might be able to convert a skeletal mesh to static mesh!
Where do I plugin in 5.4 there is already an event begin play there for the controller movement
You can add a sequence to connect multiple codes and execute them all in a sequence.
I put a print sting at the very end of the chain and it even says "pistol attached" (what i wrote there) but still the pistol is on the ground and not on my character
Finally a fix that took me less than a hundred years to do : I think the issue is that i created a blueprint for the pistol and THEN put all the meshes inside, decided to follow you step by step and right click on the mesh and create a blueprint from it, did all the needed changes for the "new" additions and it finally works, pistol goes to the socket of my character
holy crap that pistol is huge
holy crap the gun weighs 40kg, too!
you're awesome man, come to brazil
Hiya does that work for unreal engine 4 as well btw very nice tut I have been looking for something. that actually explain how it's done and u have done that thanks
@@jessplaysfs5214 thanks for the comment. Yes it will work, just use the ue4 mannequin for creating the sockets instead of the ue5 :)
I can pick up the rock but can not let go, do you have any solutions
You can join our discord
cant have more than 1 event beginplay in my blueprint what do i do
use a node called "sequence"
or hold left mous button and press S
@@LocoDev Im already using a sequens for a crosshair any other solution?
@@GaMerTriXxx add a pin in the sequence node
@@LocoDev First off thanks for the quick answer it works now, theres just one thing i dont get cause when i pick up the gun it picks it up in the wrong angle and not the angle that i laid the gun in the characters hand any idea?
works but why is it when I duplicate the object I can't pick up the duplicate?
I have the same question. Did you find the answer?
@@dimkasnusmumrik2548 the reason is because the duplicate of the object is acting as another blueprint, which can be seen when you want to see the blueprint running when testing. So because of this, the code is looking for the original static mesh and other components, not the blue print. There’s another tutorial which allows you to use duplicate and pick up but you can’t drop the item :/ hope it helps :)
Thank you! That's what I need
Awesome 👍😎
Awesome tutorial! Thanks a lot. Is this aproach more memory efficient than using Physics Handle?
I'm not sure, but it should be memory efficient.
I've never used Physics handle before.
It isn't working for me. An error comes up that says nothing was found when trying to find my object variable. I noticed that when you create your pistol object variable, it has the blueprint icon next to it. No matter what I do I can't seem to get any object variable to do that. Any thoughts?
what part of the tutorial?
@@LocoDev At 5:44 you promote the copy to a variable and it shows up as an object type variable. I looked up documentation and it seems like it should do that but for me it doesn't show the blueprint icon and it returns "none" when I run it.
And 12 hours of trying later I realized I still had the mesh of the object in my level, not the blueprinted one... No wonder it kept returning "None"... Well thanks for your tutorials, they're great!
@@ridgebingaman3848 oh, great. The BP needs to be in the world, you can also use spawn node to spawn ur BP I. The world so you don't need to place it In the world before:)
First of all, thanks!
I got some questions tho...once you turn on physics and the item lays on the ground, how would you pick it up again.
Because for some reason I cant pick up a physics actor again. It will only pick up objects which have physics turned off.
Also is there a way to make the item drop straight on the ground and not with the force of the character moving and flying off somewhere else?
The physics can be turned either on or off When the Umbrella (actor) is on the ground
Before picking up, turn off physics if it's on. >> Set simulate physics and reference the umbrella on the target I think.
You want the item from your hand to be dropped straight to the ground, I would calculate the current Z velocity which is the value that shows the current height regardless of where the character is.
Calculate your character Z Velocity and get the location of the umbrella and detach it from your character but before subtract the z value by the value of the current value of the character.
Or a better way to do this would be with a line trace pointing straight down. Then on the node of the line trace I would get the hit location of where the line trace hitted and use this information to use it on the location of detach node.
In this case a line trace would be perfect for this, I recommend you study about line traces, it's pretty useful for most coding process in general.
ua-cam.com/video/yBmPxGHu3uo/v-deo.html
docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Tracing/HowTo/SingleLineTraceByChannel/
@@LocoDev Thanks a lot!
Great Tutorial 🎉 many thx
Thank you.
Perfect
Hey Loco, Great video followed it through works great as well lol. Now, as after this I started to implement throw system it seems to be working like idk goes all over the place. Could you give me a few pointers to right direction haha thanks and keep making videos!
Good one I really enjoy it ♥️
very talented guy i love that guy, наркотик!!!!
is it possible to add multiple Items? It doesn't look good if i remake this code everytime for every item. Can i put this code in every Item Blueprint i want to?
If you want to obtain specific items, you can try learning how to use tags and tag the items that you want to be able to pick up. If you want to obtain multiple items, you need to write some code to first check whether the last item you picked up is already in your hand, before attempting to pick up a new item.
@@LocoDev hey thanks. Are you maybe able to make a new tutorial with line traces (so i have to look at it to obtain the item)
Can this also work in ue4?
Hey, im having an issue. So the tutorial worked, but once i drop the object, then try to pick it up again, the object disappears. Do you know what is causing this?
It is probably being spawned somewhere else? there could be many things, try to share the code on my Discord server.
Mine is a skeletal mesh and it just doenst work
try exporting it to blender and import it back as static mesh maybe
@@LocoDev Yeah, but I need it to be skeletal since I have animations on it. It gets attached to component but not on correct socket and it doesnt disappear from the ground, I suspect it just attaches and stays there unable to follow the character
@@LocoDev I fixed it, if anyone is having issues with skeletal mesh what you have to do is go to create blueprint class Actor, then add skeletal mesh and then drag that skeletal mesh on top of scene root that automatically generates inside of actor bp, that way you will replace it and enable the sk mesh to stick to your characters sk mesh
@@emptybruh nice
@@emptybruh Хочу добавить что тоже столкнулся с такой проблемой, можно из к Parent вызвать get actor owner component и указать туда скелетал мэш (use translate)
Hi LocoDev,
Thanks for for your great work!
I followed your tutorial one by one but I have one issue. The 'Event BeginPlay' is already used by the Input Mapping. I can't get two of them and I think that's the reason why it is not working.
Do you have any Ideas what I can do?
Thanks
If the 'Event BeginPlay' is already used by the Input Mapping, you can try the following solutions:
Rename the Input Mapping Event: You can go to the Input Mapping Event and rename it to something else that is not already used by the 'Event BeginPlay.' This should allow you to use the 'Event BeginPlay' for your purpose.
Use a different Event: If you can't rename the Input Mapping Event, you can use a different event that is not already used by the Input Mapping. For example, you can use the 'Event Tick' or 'Event ActorBeginOverlap' events.
Combine Events: If you need to use both the 'Event BeginPlay' and the Input Mapping Event, you can try to combine them into one function. You can create a new custom event, and then call the 'Event BeginPlay' and the Input Mapping Event from within that custom event.
Use Blueprint Interfaces: If you need to have multiple events in your Blueprint, you can try using Blueprint Interfaces. A Blueprint Interface allows you to define a set of events that can be implemented by any Blueprint that uses that interface. You can create a Blueprint Interface that includes both the 'Event BeginPlay' and the Input Mapping Event, and then implement that interface in your Blueprint.
i can´t get Pistol Overlap!?!
Compile and save your BP_pistol yellow first
Same here
thank you for tutorial 🥹
You're welcome !
Awesome tutorial
Thank you! Cheers!
this is great, exelent work, how you explain is incredible,
i have a small problem after i pick up the gun the character does not walk properly, is only me? or did mess something lol
yeah i have a similar problem too, the controles just bug
Awesome tutorial. Trying to make it so the player is able to pick up the same actor in both hands at the same time (just the actor place in the world twice). There seem to be some priority issues as when I have the same actor in the world twice only one can be picked up? Do you have any idea what might be happening?
Can you send me your code though my discord? I've never had such error
Just to make it a bit more clear hehe, the issue boils down to that whenever I have more than one copies of the actor in the scene, only the latest placed actor is "pick up-able". I have unchecked "consume input" on my action-event (keypress E).
Can I use this for different items I mean it's ok now I can pick up a pistol but can I use this blueprint to pic up a box for example ? cuz I tried to duplicate the blueprint and changed the static mesh from pistol to box but it didn't work!
I have the same question. Did you find the answer?
No. but I found another way to do it
@@dimkasnusmumrik2548
😭😭😭 doesn't work because "event beginplay" is already used, its a basic code for fonctional the game i believe.. and i don't know what i do (sorry my english)
Amazing
I got!
THANK YOU!!!🥰
Any time!
Thank yo
Sorry, the file you have requested does not exist.
Which?
Hi LocoDec, very nice tutorial, thankyou. I don't suppose you would be able to show me how to do this with a linetrace? I have tried to combine your tutorial with another tutorial and made my own blueprint to attach items to character sockets, however when Simulate Physics is enabled on the objects, they no longer react to the player? ua-cam.com/video/O-JykXxxRjI/v-deo.html I've been asking everywhere for help so i figured I might ask here as well!
what do you mean by react to the player? did you try checking the option "mass"?
@@LocoDev thankyou for the response. I've uploaded a video to demonstrate: ua-cam.com/video/MgcoMLMwzrg/v-deo.html (Mass is checked and set to 40)
@@olivermarden2433 reach me out on discord Fabiano#8438 I can probably solve your issue
are this problem already solved? i already following 3:18 too, when i check simulate / and mass, the object not moving, but when i uncheck both of them, i can move the object
@@igmap3892 Hi, for me it was an issue with the 'sceneroute'. My actor was the child of another actor and i think the parent actor's physics was overriding the physics of the one i wanted to use. If not that just look at the physics of your scene route and perhaps make your mesh obect the route of the scene in the bp. If this doesnt make sense just lemme know and ill try and explain it better
Don’t know what you did because you clipped it out lol but I cant add a second event begin play
Add sequence node after event begin play, then you can use the second pin
how was the item outputs created at minute 12:03 please help me?