Okay, so I’m trying to create an inventory system for a project. This system will require me to maintain functionality of the weapons being used, and maintain their state (and even continue to do logic while being stored in inventory). At first I decided to try and just store the weapons in an array, but whenever I try to switch the weapons, it seems like I can’t modify or even do much of anything to the actors in the array. For instance, I was originally adding the current weapon to the array, then taking out the first index to make it the current weapon, then removing that entry, but, sadly, it seems that pretty much nothing happens, it just keeps adding in the same weapon, rather than switching the weapons out.
It seems that the main problem is that I can only grab actors out of the array by copy, rather than by reference, does anyone know a work around at all? this is rather frustrating.