Attach weapon on a socket

Hi , i m french sorry for m’y english
i Start on unreal engine and i need help for create an trade weapon system. Look first 30 second

i would like when i press E trade m'y actual weapon with weapon on the floor

i have create 2 weapon and socket plz help me for fonction

plz post your idea

  • deattach your weapon from slot
  • set your weapon position to weapon on floor
  • attach the weapon on floor to your slot
    :stuck_out_tongue:

good idea but if i have 25 weapon , how the program knows the weapon that I must deattach

For deattach weapon:

  • You have to create variable “equipped weapon”, so you always know which weapon will be trade. this variable always change whenever you change weapon

For weapon in floor:
Add box Collision in Weapon Blueprint.

“On component begin overlap”, change Player character “Target Item”(Variable) to overlapped weapon.

Do algorithm that i wrote above to the “Target Item”