Current Weapon Ammo Amount on Scene Change

MrQuaid

Member
Hi, is there a method to find the ammo amount still left in the clip after a scene change? I already have a way to to check and save the ammo not in the clip, however I don't for whats in the clip. What happens is I have say 50 rounds, add 6 in the gun which leaves me with 44 rounds. I then change scenes and with my scene manager I can easily get and save the 44 rounds but the other 6 are gone.

Ideally I would like to be able to at least add the bullets left in the clip back to the main count. Is this possible?
 
You can get/set the ammo amount with the Get/SetConsumableItemTypeCount method on the IUsableItem interface. You'll need to loop through all of the ItemActions to determine if it is of type IUsableItem.
 
Top