I need some help dealing with instances of spawned actors. I have set up a Default Loadout Array which does a For Loop and adds items to my Current Loadout Array when my character spawns, similar to the way ShooterGame does it. Once it has added all weapons to the array it sets my currentweaponIdx to be 0, which tells my Spawn Actor Node what class to spawn from the array. This part all works.
I can switch weapons simply by adding or subtracting from my index number, perfect!
Now here is where it all starts to go wrong. My only option so far when switching weapons to is to destroy the previous actor. When I scroll back to the weapon, it spawns a new instance. A new instance every time i change weapons meaning I have none of the changed variables from the previous instance. ShooterGame handles this part differently, each time you change weapons it switches back to the same instance and I have no idea how they did it. I have gone over the code numerous times but my understanding of C++ is limited. This is where I need some guidance, arrays are very new to me. What are my other options?