GetAmmoCapacity (Actor function)

From ZDoom Wiki
Jump to navigation Jump to search

(New from 4.8.0)

int GetAmmoCapacity (class<Ammo> type)

Usage

Retrieves the max amount of the specified ammo type in the calling actor's inventory.

Parameters

  • type: the class name of the ammo type.

Return value

The current max amount of the ammo type in the inventory. If the ammo type does not exist in the inventory, then its default max amount, as defined in its definition, is returned. If the ammo type is an invalid class, the function returns 0.

Examples

Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.


See also