Hey Guys! Im need some help… I Just started with Unreal Engine Development sooo im still a noob.
My problem is that i created a pickup system for meshes. So the Mesh attaches to the Skeleton. When just walked over the first item its all fine, its equiped. But when i walk over the second without dropping the first both are equiped. I tried to fix that problem with Booleans and Casts . But it didnt work anyone got an idea?
The only other thing you might look at aswell it setting a variable that stores what you have picked up and where it is, and create a function that cleans up existing attached items.
This could help when attaching other items to other sockets later on. Like a hat or a set of boots.
hmmm … But where i should place the detach function? Like my old in the LevelBlueprint?
Should i make a PickUpItem Function ? And where?
When i create a functin i need to cast the var to the other weapon that they know when someone of them is attached right?
The other problem i got … when i create a variable for collsion sphere and set it on overlap to true and on end overlap to false… i tried to cast it to the other item. There i did the same and casted it to the first one… But after that couldnt compile them …
Wait, what overlap ? The one of the collision or the normal Event Actor Begin overlap? I think its the last one. OK so the next question. You wrote cast to your player … so to my MyCharackter BP? .
And what you mean with reference what you have socketed ?
1st, end overlap. Because you are picking up the item, you will need to remove from the game. if removed, on end overlap will not work, as it no longer exists.
Variable: when you pick up the item, turn that in to a variable. That way you can reference it later. That means when you want to remove it, you only need to reference that variable.
So on begin overlap, you know what mesh it is. it will be it the BP, find it and promote it to a variable, same as you would with cast to all actors and promote to a variable