Hi,
I am creating a game in which you have three weapons at once, a melee(that you start with at the beginning of the game), gunA, and gunB (both guns are picked up during the course of the game). The guns are customizable in the sense that there are multiple weapons. (shotgun, ak-47, m9, uzi). Gun A and Gun B are not on a primary/secondary basis. My question is how do I make a system in which you can choose the gun you use and how do I swap between the two traits of the guns (ex. fire rate, dmg, and ammo capacity). A response would be greatly appreciated. Thank you
You can write a new class for WeaponType maybe, and then:
WeaponType gunA, gunB;
Somewhere you’d have a list or array of possible weapon types, created when game starts.
There are many ways to go about weapon switching. A simple way could be for you to pre set the gameobject position on the player but then set it to active when an event is triggered this event could be on pickup using the OnCollisionEnter function or when a key is pressed using Input.getkey.