so I am currently working on a FPS game and I (currently) have 14 primary weapons and lots of attachments.
What I currently have:
When I selcet a weapon the selected weapon is attached to the right hand of my character, the same is true for the secondary weapon and the pistol. Default the secondary and the pistol are not visible and can’t shoot. When I press “2” the secondary weapon is set visible and the other two guns are invisible, when presssing “1” “3” similar things happen…So the weapon switching is based on visibility.
It worked quit well, but now I am trying to add attachments to my weapons. They are only set visible inside the BP. when a player has selected them, however this causes some problems when switching weapons, as you can imagin…As there are about 30 different attachments that can be equipped(laser,scope,barrle,stock,mag…) to every weapon, setting the visibility with branches and variables seems a bit too much work.
Also destroying and spawning a new gun when switching weapons is not an option, because the ammo details would get lost
I would like to set the visibility of the weapon and the selected attachments to visible on spawning and then when pressing 1/2/3 on the keyboard not changing visibility, but instead socets. So when spawning my visible primary would be in my hand, the secondary on my back and the pistol close to my hip.
Do you have better ideas or maybe know how to do this?
Thank you very much in advance!
(i know the screenshot provided is not very good…)