# Agent Of Player For Unit

Grammar — Agent of player player for unit
FlagsNative | Function

Returns the unit that is currently assigned as the specified player’s purchasing agent for the specified shop unit.

# Arguments

  • unit — Unit
  • int — Player

Returns — unit

native unit UnitAgent(unit inUnit, int inPlayer);

Category: Unit / Basic

# Examples

# mods/warcoop/warclassic.sc2mod

WarClassic.galaxy

// L762
UnitAgent(lv_sHOP, UnitGetOwner(lv_uNIT))