# Inventory Item Count
Grammar — Number of Items countType for unit
Flags —Native
|Function
Returns the inventory item count for the specified unit.
# Arguments
unit
— Unitint
[ preset::Unit_Color_Change_Option2 ] — Count Type
Returns — int
native int UnitInventoryCount(
unit inUnit,
int inCountType,
);
# Related
Category: Unit / Items
- [F] —
void
— Create Inventory Item — ( UnitInventoryCreate ) - [F] —
void
— Add Item To Inventory — ( UnitInventoryAdd ) - [F] —
unit
— Last Created Inventory Item — ( UnitInventoryLastCreated ) - [F] —
unit
— Inventory Item Carried — ( UnitInventoryItem ) - [F] —
unit
— Inventory Item Carrier — ( UnitInventoryUnit ) - [F] —
int
— Inventory Item Container — ( UnitInventoryContainer ) - [F] —
int
— Inventory Item Slot — ( UnitInventorySlot ) - [F] —
int
— Inventory Item Index — ( UnitInventoryIndex ) - [F] —
int
— Inventory Item Count — ( UnitInventoryCount ) - [F] —
unitgroup
— Inventory Items Carried — ( UnitInventoryGroup ) - [F] —
void
— Open Inventory Container — ( UnitInventoryContainerOpen ) - [F] —
void
— Move Inventory Item — ( UnitInventoryMove ) - [F] —
void
— Remove Inventory Item — ( UnitInventoryRemove ) - [F] —
void
— Unit Acquires Powerup — ( TriggerAddEventUnitPowerup ) - [F] —
unit
— Triggering Powerup — ( EventUnitPowerupUnit ) - [F] —
void
— Unit Manipulates Inventory — ( TriggerAddEventUnitInventoryChange ) - [F] —
int
[ preset::InventoryManipulation ] — Triggering Inventory Manipulation — ( EventUnitInventoryChange ) - [F] —
unit
— Triggering Inventory Item — ( EventUnitInventoryItem ) - [F] —
int
— Triggering Inventory Item Container — ( EventUnitInventoryItemContainer ) - [F] —
int
— Triggering Inventory Item Slot — ( EventUnitInventoryItemSlot ) - [F] —
point
— Triggering Inventory Item Target Point — ( EventUnitInventoryItemTargetPoint ) - [F] —
unit
— Triggering Inventory Item Target Unit — ( EventUnitInventoryItemTargetUnit )
# Examples
# mods/warcoop/warclassicsystem.sc2mod
// L19
UnitInventoryCount(u,c_unitInventoryCountCarried)