Associate Ammo with Weapon?

In the Gamemode blueprint you can press the + button for the array, and change the values there, and you can also edit them on the fly/in-game pretty easily.

Thing is, unless you know which entry corresponds to which ammo type, you could mess it up adding it all manually. My solution above is really to avoid having lots of unnecessary pointers/class references and duplication across your code, and prevents having to iterate TMaps and TArrays of unknown size everytime you fire the weapon, which could eventually become a bottleneck.

In regards to infinite ammo, I’d do that in the weapon - just skip the call to remove ammo if the weapon has bInfiniteAmmo = true or something, but to be honest this all depends on the design of the game and what you want to add later.