# Agent Of Player For Unit
Grammar — Agent of player player for unit
Flags —Native|Function
Returns the unit that is currently assigned as the specified player’s purchasing agent for the specified shop unit.
# Arguments
unit— Unitint— Player
Returns — unit
native unit UnitAgent(unit inUnit, int inPlayer);
# Related
Category: Unit / Basic
- Unit Show Kill Display —
void— UnitShowKillDisplay - Unit Can Path To Point —
bool— UnitPathableToPoint - Unit Can Path To Unit —
bool— UnitPathableToUnit - Create Units With Default Facing —
void— libNtve_gf_CreateUnitsWithDefaultFacing - Create Units With Point Facing —
void— libNtve_gf_CreateUnitsAtPoint2 - Create Units Facing Angle —
unitgroup— UnitCreate - Create Units Facing Point —
unitgroup— libNtve_gf_UnitCreateFacingPoint - Last Created Unit —
unit— UnitLastCreated - Last Created Units —
unitgroup— UnitLastCreatedGroup - Original Caster Of Unit —
unit— UnitGetOriginalCaster - Effect That Created Unit —
string<gamelink::Effect> — UnitGetOriginalEffect - Replace Unit —
void— libNtve_gf_ReplaceUnit - Last Replaced Unit —
unit— libNtve_gf_LastReplacedUnit - Change Owner —
void— UnitSetOwner - Unit Owner Changes —
void— TriggerAddEventUnitChangeOwner - Old Unit Owner —
int— EventUnitOwnerOld - New Unit Owner —
int— EventUnitOwnerNew - Rescue Unit —
void— libNtve_gf_RescueUnit - Rescue Unit Group —
void— libNtve_gf_RescueUnit2 - Kill Unit —
void— UnitKill - Revive Unit —
void— UnitRevive - Remove Unit —
void— UnitRemove - Owner Of Unit —
int— UnitGetOwner - Unit Is Alive —
bool— UnitIsAlive - Unit Is Valid —
bool— UnitIsValid - Unit Group Is Dead —
bool— libNtve_gf_UnitGroupIsDead - Move Unit Instantly —
void— UnitSetPosition - Make Unit Face Angle —
void— UnitSetFacing - Make Unit Face Point —
void— libNtve_gf_MakeUnitFacePoint - Position Of Unit —
point— UnitGetPosition - Goal Position Of Unit —
point— UnitGetGoalPosition - Facing Angle Of Unit —
fixed— UnitGetFacing - Pause/Unpause Unit —
void— libNtve_gf_PauseUnit - Pause/Unpause All Units —
void— UnitPauseAll - Sleep/WakeUp Unit —
void— libNtve_gf_SleepUnit - Show/Hide Unit —
void— libNtve_gf_ShowHideUnit - Share Vision of Unit —
void— libNtve_gf_ShareVisionofUnit - Unit Is Paused —
bool— libNtve_gf_UnitIsPaused - Unit Is Sleepiing —
bool— libNtve_gf_UnitIsSleepiing - Unit Is Hidden —
bool— libNtve_gf_UnitIsHidden - Unit Is Visible To Player —
bool— libNtve_gf_UnitIsVisibleToPlayer - Set Unit Custom Value —
void— UnitSetCustomValue - Custom Value Of Unit —
fixed— UnitGetCustomValue - Unit Enters/Leaves Region —
void— TriggerAddEventUnitRegion - Triggering Region —
region— EventUnitRegion - Unit Enters/Leaves Point —
void— TriggerAddEventUnitRangePoint - Unit Enters/Leaves Range Of Unit —
void— TriggerAddEventUnitRange - Triggering Range Unit —
unit— EventUnitRangeUnit - Unit In Region —
bool— libNtve_gf_UnitInRegion - Triggering Unit —
unit— EventUnit - Load Unit Model —
void— UnitLoadModel - Unload Unit Model —
void— UnitUnloadModel - Agent Of Player For Unit —
unit— UnitAgent - Change Empty Unit Variables In Events —
void— UnitEventSetNullVariableInvalid - Name of Unit —
text— UnitGetName - Ideal Harvester Count —
int— UnitIdealWorkerCount - Current Harvester Count —
int— UnitCurrentWorkerCount
# Examples
mods/warcoop/warclassic.sc2mod — base.sc2data/TriggerLibs/WarClassic.galaxy:762
}
if (!((UnitAgent(lv_sHOP, UnitGetOwner(lv_uNIT)) != lv_sHOP))) {
return false;
}