Ammo count not updated on pickup and AmmoData always 0

bitmore

Member
Hi,
I'm using UCC 2.4.2+UIS1.2.2 and the integration package is 2.0.5. I have some issues:

1. The ammo count of SlotItemMonitor is not updated after picking up ammo. Let's say the scene has two boxes and each of them has both 1 AssaultRifle and 150 bullets. I pick up one box and equip the assault rifle, the monitor shows 50/100 ammo(clip size is 50). Then I pick up the second box, there is 250 ammo(50 in equipped rifle) in inventory but the monitor is not updated. If I reload the rifle then the monitor was updated to the correct value.

2. The AmmoData attribute in assault rifle is always 0/50(Clip Remaining is always 0), no matter I reload it or drop it to the scene.

3. If I equip the rifle and jump to the next scene, the ammo amount in inventory will be consumed again(like the ammo is reloaded to the rifle again).


EDIT:
I removed the ItemObject component before and I added it back now, then issue 2 and 3 is fixed now. But here comes another issue: equipped the rifle will consume the double amount of clip size of ammo. It's like in Inventory Menu and equips the rifle, it consumes once. Close the menu back to the scene, will consume again.
 
Last edited:
I am using UCC 2.4.3 and UIS 1.2.3 and the integration package 2.0.6.

In the demo scene I duplicated one of the assault rifle pickups twice and set one with 150 bullets and the other with 250 bullets. I picked up one, The ammo gets added to the currently equipped assault rifle, Then I pickup the second one and the Item Monitor updates just fine leaving me with 48/309 ammo (309 because I already had an assault rifle in hand before picking up the other two rifles, and I switched rifles which added the ammo to another one)

I would recommend you make a project backup and update the assets. Hopefully that's the issue and not something more complicated. Make sure to test it out the the demo scene first to know if the issue comes from your setup or with the system
 
I am using UCC 2.4.3 and UIS 1.2.3 and the integration package 2.0.6.

In the demo scene I duplicated one of the assault rifle pickups twice and set one with 150 bullets and the other with 250 bullets. I picked up one, The ammo gets added to the currently equipped assault rifle, Then I pickup the second one and the Item Monitor updates just fine leaving me with 48/309 ammo (309 because I already had an assault rifle in hand before picking up the other two rifles, and I switched rifles which added the ammo to another one)

I would recommend you make a project backup and update the assets. Hopefully that's the issue and not something more complicated. Make sure to test it out the the demo scene first to know if the issue comes from your setup or with the system
Hi Sangemdoko,
I appreciate your time. I have tested the demo scene and it works fine in the demo. I have compared all settings I can think of with the demo scene and I can't figure it out. And I also updated to the newest versions which are UCC 2.4.4 and UIS 1.2.3 and the integration package is 2.0.7.
I can provide some screenshots of my settings but I'm not sure which settings are most relevant. It will be great if I can get some suggestions for which settings I should check.
 
I would say the relevant parts are the ShootableWeapon component, specifically the Reload section:
1638261330629.png

Also check the Shootable Weapon Ammo Binding component on the same prefab, and the ItemBinding.
And the Ammo Data attribute on the weapon within the Inventory System Editor Manager itself is also important.

Then the slot monitor is the one that shows the ammo amount:
1638261561488.png

If you are using the Item View for showing the ammo amount then make sure you are using the appropriate field. You can choose to show the clip size or the total amount
1638261795004.png

I think those are the relevant ones to check
 
Top