# Inventory Item Carried

Grammar — Item carried by unit in index
FlagsNative | Function

Returns a specific inventory item carried by the unit.

# Arguments

  • unit — Unit
  • int — Index

Returns — unit

native unit UnitInventoryItem(unit inUnit, int inIndex);

Category: Unit / Items

# Examples

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:24

    unit itemTarget;
    for(;i<=c;i+=1){
        item=UnitInventoryItem(u,i);
        if(UnitGetType(item)==itemType){
            itemTarget=item;