# Inventory Items Carried
Grammar — All items carried by unit
Flags —Native
|Function
Returns a unit group containing all items carried by the specified unit.
# Arguments
unit
— Unit
Returns — unitgroup
native unitgroup UnitInventoryGroup(unit inUnit);
# Related
Category: Unit / Items
- Create Inventory Item —
void
— UnitInventoryCreate - Add Item To Inventory —
void
— UnitInventoryAdd - Last Created Inventory Item —
unit
— UnitInventoryLastCreated - Inventory Item Carried —
unit
— UnitInventoryItem - Inventory Item Carrier —
unit
— UnitInventoryUnit - Inventory Item Container —
int
— UnitInventoryContainer - Inventory Item Slot —
int
— UnitInventorySlot - Inventory Item Index —
int
— UnitInventoryIndex - Inventory Item Count —
int
— UnitInventoryCount - Inventory Items Carried —
unitgroup
— UnitInventoryGroup - Open Inventory Container —
void
— UnitInventoryContainerOpen - Move Inventory Item —
void
— UnitInventoryMove - Remove Inventory Item —
void
— UnitInventoryRemove - Unit Acquires Powerup —
void
— TriggerAddEventUnitPowerup - Triggering Powerup —
unit
— EventUnitPowerupUnit - Unit Manipulates Inventory —
void
— TriggerAddEventUnitInventoryChange - Triggering Inventory Manipulation —
int
<preset::InventoryManipulation> — EventUnitInventoryChange - Triggering Inventory Item —
unit
— EventUnitInventoryItem - Triggering Inventory Item Container —
int
— EventUnitInventoryItemContainer - Triggering Inventory Item Slot —
int
— EventUnitInventoryItemSlot - Triggering Inventory Item Target Point —
point
— EventUnitInventoryItemTargetPoint - Triggering Inventory Item Target Unit —
unit
— EventUnitInventoryItemTargetUnit
# Examples
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:459
lv_caster = lp_source;
lv_target = lp_target;
lv_itemSources = UnitInventoryGroup(lv_caster);
// Implementation
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:1398
}
auto26E7FEFB_g = UnitInventoryGroup(lv_caster);
auto26E7FEFB_u = UnitGroupCount(auto26E7FEFB_g, c_unitCountAll);
for (;; auto26E7FEFB_u -= 1) {
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:1682
// Variable Initialization
lv_unit = EventUnit();
lv_items = UnitInventoryGroup(lv_unit);
// Actions
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicTactical.galaxy:653
}
autoA2999706_g = UnitInventoryGroup(lp_aIUnit);
autoA2999706_u = UnitGroupCount(autoA2999706_g, c_unitCountAll);
for (;; autoA2999706_u -= 1) {