Weapon Mag Adding?

Hello all, I just wanted to know if I am on the right track for call certain magazines for types of weapons. I made a array of integers held in weapon, then I have magazine ID being a set integer. I also have Magazine Type under weapon structure & Magazine Structure set as strings to check to see if names match. If im correct by logic in blueprint below I am calling to see if Magazine Types match, On “True” Im getting Weapon and magazine ID; Then finding ID in Array; finally adding result to the array.


                                                                                                                                                                                     This Number Is Magazine Type

Is this the correct way to start setting up magazine types for weapon types? Meaning if this is a 9MM(Weapon)&9MM(Magazine)(1): Then add that Magazine Type to the Array? Then I could use the variables from the structures to change the amount of ammo a magazine held----So extended clip VS regular clip, Right? Or am I way off?

Don’t use ids . too cumbersome and little use. use whole classes instead. You can always match two classes easily and unlike id it helps to make hierarchy in case you want the same mag to fit in different guns

Thanks for quick reply. So how would I do this? In the structure make a variable type “Actor Class”?

if you make a seperate class of type mag that would be better as it would keep your logic cleaner in the sense that that variable can hold only mag type classes and its children while making actor could hold almost 90% of game classes which you don’t want. so use a specualised magzine class for mags

I couldn’t help but notice your struct-ception. :stuck_out_tongue: