Hi everyone,
I am working on a project where the player will get multiple guns throughout the game, if I put all the guns under a family and give the family instance variables like; clip, ammo, fire rate, damage, etc. then I can delete the guns family and then spawn the one I want, then I can subtract clip and ammo and use the fire rate and damage variables from the family, and because only one weapon is active it will use its variable. This all works fine and potentially I could add hundreds of weapons and expand the game really easily.
I have tested it and it is by far the simplest way to do this. But, when the object is deleted and respawned it resets all its variables, this is bad. This is the neatest, fastest and simplest way to handle hundreds of weapons with minimal coding since I only need to substitute the weapons variables in to one template and It will work for all the weapons, firing, reloading, damage, etc.
If anyone knows how to solve this or another way that it is kind of the same but could still handle multiple weapons please let me know.
Thanks in advance for anyones help.