# Alliance Aspect

Grammar — Player inSourcePlayer is giving player inTargetPlayer inAllianceId
FlagsNative | Function

Returns true of the source player is treating the target player with the specified alliance aspect. To check if two players are mutually treating each other with a given alliance aspect, use this function again with the players in reverse order.

# Arguments

  • int — Source Player
  • int [ preset::AllianceAspect ] — Alliance Aspect
  • int — Target Player

Returns — bool

native bool PlayerGetAlliance(
	int inSourcePlayer,
	int inAllianceId,
	int inTargetPlayer,
);

Category: Player / Alliances

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L2433
PlayerGetAlliance(UnitGetOwner(EventUnit()), c_allianceIdPassive, gv_p01_USER)
// L2433
PlayerGetAlliance(UnitGetOwner(EventUnit()), c_allianceIdPassive, gv_p01_USER)

# mods/core.sc2mod

NativeLib.galaxy

// L3828
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdPassive, lp_targetPlayer)
// L3828
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdChat, lp_targetPlayer)
// L3831
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdPassive, lp_targetPlayer)
// L3831
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdChat, lp_targetPlayer)
// L3831
PlayerGetAlliance(lp_targetPlayer, c_allianceIdPassive, lp_sourcePlayer)
// L3831
PlayerGetAlliance(lp_targetPlayer, c_allianceIdChat, lp_sourcePlayer)
// L3834
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdPassive, lp_targetPlayer)
// L3834
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdChat, lp_targetPlayer)
// L3837
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdPassive, lp_targetPlayer)
// L3837
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdChat, lp_targetPlayer)
// L3182
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdPassive, lp_targetPlayer)
// L3182
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdChat, lp_targetPlayer)
// L3185
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdPassive, lp_targetPlayer)
// L3185
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdChat, lp_targetPlayer)
// L3185
PlayerGetAlliance(lp_targetPlayer, c_allianceIdPassive, lp_sourcePlayer)
// L3185
PlayerGetAlliance(lp_targetPlayer, c_allianceIdChat, lp_sourcePlayer)
// L3188
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdPassive, lp_targetPlayer)
// L3188
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdChat, lp_targetPlayer)
// L3191
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdPassive, lp_targetPlayer)
// L3191
PlayerGetAlliance(lp_sourcePlayer, c_allianceIdChat, lp_targetPlayer)

# mods/heroesdata.stormmod

UILib.galaxy

// L7456
PlayerGetAlliance(lp_pingingPlayer, c_allianceIdChat, UnitGetOwner(lp_targetUnit))
// L15671
PlayerGetAlliance(lv_clickingPlayerID, c_allianceIdChat, lv_targetPlayerID)

# mods/missionpacks/novacampaign.sc2mod

LibNCUI.galaxy

// L6591
PlayerGetAlliance(UnitGetOwner(libNCUI_gv_NU_BB_Boss), c_allianceIdPassive, 1)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L8376
PlayerGetAlliance(lv_aIPlayer, c_allianceIdVision, lv_humanPlayer)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L6187
PlayerGetAlliance(lv_indexPlayer, c_allianceIdVision, lv_humanPlayer)