Bullet count through script

TGM

New member
Hello everyone! I hope all is well.

Is there a way to change the number of bullets (Pistol bullets for example), through code?

Your help would be highly appreciated.
Thanks! :)
 
You can add new bullets by getting a reference to the inventory and then calling PickupItemType. Here's an example:


If you want to modify the existing ItemType amount on an IUsableItem (such as ShootableWeapon) you can get a reference to that ItemAction and then call SetConsumableItemType. This post has an example of getting the ItemAction: https://opsive.com/forum/index.php?threads/inventory.1376/
 
  • Like
Reactions: TGM
Top