multiple weapon types, one per socket at a time

Hi,
I’m trying to create a weapon spawn system that when you unequip the weapon it attaches to the correct socket. No problems so far with this, however I have multiple weapons that occupy the same slot and when they get stowed they overlap each other. Without some spaghetti code I can’t really think of a way to make sure only one weapon of that type is occupying that given slot. I have 3 slots, Hip, Back and Shoulder.

BPs for ref.

When I pickup the weapon

When I stow the weapon to the socket

i use a map of type name for socket and actor for weapon.

when you try attach a weapon check the map if a current weapon is valid, if so you can replace it or not attach the new weapon.

1 Like

thanks, that seems like a good idea, I’ll try and work on it