Associate Ammo with Weapon?

As Unreal Newbie, I cannot be certain about the solution… but I might can provide you my own solution though. First, I think I gonna make TMap or TArray (Personally TMap, but in order to access it by Blueprint, u need to make UFUNCTIONs) of your character’s ammunition. TMap <EnumAmmoType, Ammunition class> or TArray<Ammuition class> (For now, I gonna use TMap). Second, in your weapon class, I think I gonna set two Variables by Enum -> EnumAmmoType AmmoPrimary, EnumAmmoType AmmoSecondary. In Blueprint of Weapon class, you can set ur ammo usage type as Enum. So, when you gonna use the function “Fire (or shoot)”, you check the current weapon (i think you made it as TSubclassOf<Weapon>) and its ammo usage. after getting its ammo usage type, access the ammunition inventory, decrease the specific type of ammo as you desired number. I think I would create UFUNCTION as “void ModifyTheAmmoQuantity(EnumAmmoType type, int changeInQuantity)” if your ammunition inventory is TMap…(use FindRef(type) to get the value) but I am not still familiar with TArray… sorry about it.

It is very newbie solution… that’s what I come to think of it… I hope you find it useful :stuck_out_tongue: