# Unit Manipulates Inventory

Grammarunit manipulates item
FlagsNative | Event

This event fires when a unit performs the specified action on the specified inventory item. Use “Triggering Inventory Item” to get the inventory item, “Triggering Inventory Item Container” to get the container the item resides in, “Triggering Inventory Item Slot” to get the slot the item occupies, “Triggering Inventory Item Target Point” to get the point targeted by the action, and “Triggering Inventory Item Target Unit” to get the unit targeted by the action.

# Arguments

Returns — void

native void TriggerAddEventUnitInventoryChange(
	trigger t,
	unitref u,
	int inChangeType,
	unitref inItem,
);

# Event parameters

Category: Unit / Items

# Examples

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:497

    libGAw3_gt_EVENT_PLAYER_UNIT_DROP_ITEM = TriggerCreate("libGAw3_gt_EVENT_PLAYER_UNIT_DROP_ITEM_Func");
    TriggerEnable(libGAw3_gt_EVENT_PLAYER_UNIT_DROP_ITEM, false);
    TriggerAddEventUnitInventoryChange(libGAw3_gt_EVENT_PLAYER_UNIT_DROP_ITEM, null, c_unitInventoryChangeDrops, null);
}

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:541

    libGAw3_gt_EVENT_PLAYER_UNIT_PICKUP_ITEM = TriggerCreate("libGAw3_gt_EVENT_PLAYER_UNIT_PICKUP_ITEM_Func");
    TriggerEnable(libGAw3_gt_EVENT_PLAYER_UNIT_PICKUP_ITEM, false);
    TriggerAddEventUnitInventoryChange(libGAw3_gt_EVENT_PLAYER_UNIT_PICKUP_ITEM, null, c_unitInventoryChangePicksUp, null);
}

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:585

    libGAw3_gt_EVENT_PLAYER_UNIT_USE_ITEM = TriggerCreate("libGAw3_gt_EVENT_PLAYER_UNIT_USE_ITEM_Func");
    TriggerEnable(libGAw3_gt_EVENT_PLAYER_UNIT_USE_ITEM, false);
    TriggerAddEventUnitInventoryChange(libGAw3_gt_EVENT_PLAYER_UNIT_USE_ITEM, null, c_unitInventoryChangeUses, null);
}

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:727

    libGAw3_gt_EVENT_PLAYER_UNIT_PAWN_ITEM = TriggerCreate("libGAw3_gt_EVENT_PLAYER_UNIT_PAWN_ITEM_Func");
    TriggerEnable(libGAw3_gt_EVENT_PLAYER_UNIT_PAWN_ITEM, false);
    TriggerAddEventUnitInventoryChange(libGAw3_gt_EVENT_PLAYER_UNIT_PAWN_ITEM, null, c_unitInventoryChangeSells, null);
}

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:551

void libGAwX_gt_SuppressInvisibilitywhenUsingItems_Init () {
    libGAwX_gt_SuppressInvisibilitywhenUsingItems = TriggerCreate("libGAwX_gt_SuppressInvisibilitywhenUsingItems_Func");
    TriggerAddEventUnitInventoryChange(libGAwX_gt_SuppressInvisibilitywhenUsingItems, null, c_unitInventoryChangeUses, null);
}