CountInv

From ZDoom Wiki
Jump to: navigation, search

int CountInv (string itemtype [, int ptr_select])

Usage

Returns the specified pointer's inventory item count for a specific item, like CheckInventory but for DECORATE.

Note that this function is to be used where an expression is expected. It is mostly useful when combined with A_JumpIf and can be used to replace A_JumpIfInventory.

Parameters

  • itemtype: the inventory item to count and return.
  • ptr_select: the pointer to examine. Default is AAPTR_DEFAULT, which points to the caller of the function. See actor pointers.

Return value

Returns the exact count of itemtype an actor has.

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 contibutions are greatly appreciated.