Associate Ammo with Weapon?

I feel like this is not even UT4 specific more of a general programming question. I could think of the following solutions to add additional information to the proposed solution (tho my solution would involve a proper inventary system, handling “items”):

  • Add additional arrays containing the max/min whatever counts having the same indexes
  • Extend the array to have some kind of a class/struct etc, containing your information (current, max…)

Edit:

As for an example, for the first solution, add additional array like this:



TArray<int32> AmmoInventory;
TArray<int32> AmmoMax; // holds max for each ammo type