Playmaker Action 'Get Item Identifier Amount' doesn't include loaded ammo

hazuki

Member
Hi,

When using the Playmaker Action 'Get Item Identifier Amount' and getting the ammount of ammo a player has the value returned does not include the ammo that is loaded into the clip. So if I have a pistol with 6 ammo in the clip and 100 on the player the value returned is just 100. Is there a way to get the full total?

Thanks
 

Andrew

Moderator
Staff member
You'll also need to use UsableItem.GetConsumableItemIdentifierAmount() - I'd imagine there's a Playmaker action for this, too.
 

hazuki

Member
Thanks! There doesn't seem to be an action for it but I think I should be able to make one... so to get a true total for the player's ammo I'll need to get it from the player character's inventory and from each of the weapons the player is holding and total them up right?
 

Andrew

Moderator
Staff member
If the player is holding multiple items that use the same ammo item that you're trying to count, then yeah.
 

hazuki

Member
Hi, so, while that works it also presents another problem. I'm trying to have 3 Ammo types shared by any weapons but the problem is that as soon as a weapon has loaded some ammo into the clip it then that ammo becomes unavailable to the other weapons.

Making the clip sizes -1 solves part of the problem but then the total ammo is never reduced and the player can fire without spending any ammo at all.

Do you have any suggestions as to how I might get around this?

Thanks
 

Andrew

Moderator
Staff member
Sorry not sure I understand exactly - what do you mean by the ammo becomes unavailable to other weapons? Is this when you have multiple weapons active that use the same ammo? For example, in the demo scene the right and left pistols are dual wield-able but both use the same ammo item.
 
Top