# Alliance Aspect
Grammar — Player inSourcePlayer is giving player inTargetPlayer inAllianceId
Flags —Native
|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 Playerint
[ preset::AllianceAspect ] — Alliance Aspectint
— Target Player
Returns — bool
native bool PlayerGetAlliance(
int inSourcePlayer,
int inAllianceId,
int inTargetPlayer,
);
# Related
Category: Player / Alliances
- [F] —
void
— Player Changes Alliances — ( TriggerAddEventPlayerAllianceChange ) - [F] —
void
— Set Alliance — ( libNtve_gf_SetAlliance ) - [F] —
void
— Set Alliance (One-Way) — ( libNtve_gf_SetAllianceOneWay ) - [F] —
void
— Set Alliance Aspect — ( PlayerSetAlliance ) - [F] —
void
— Set Alliance For Player Group — ( libNtve_gf_SetPlayerGroupAlliance ) - [F] —
void
— Set Alliance Between Two Player Groups — ( libNtve_gf_SetAllianceBetweenTwoPlayerGroups ) - [F] —
void
— Set Alliance Aspect For Player Group — ( libNtve_gf_SetAllianceAspectForPlayerGroup ) - [F] —
bool
— Alliance Aspect — ( PlayerGetAlliance ) - [F] —
bool
— Get Relationship Between Players — ( libNtve_gf_PlayerIsEnemy )
# Examples
# campaigns/liberty.sc2campaign
// L2433
PlayerGetAlliance(UnitGetOwner(EventUnit()), c_allianceIdPassive, gv_p01_USER)
// L2433
PlayerGetAlliance(UnitGetOwner(EventUnit()), c_allianceIdPassive, gv_p01_USER)
# mods/core.sc2mod
// 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
// L7456
PlayerGetAlliance(lp_pingingPlayer, c_allianceIdChat, UnitGetOwner(lp_targetUnit))
// L15671
PlayerGetAlliance(lv_clickingPlayerID, c_allianceIdChat, lv_targetPlayerID)
# mods/missionpacks/novacampaign.sc2mod
// L6591
PlayerGetAlliance(UnitGetOwner(libNCUI_gv_NU_BB_Boss), c_allianceIdPassive, 1)
# mods/starcoop/starcoop.sc2mod
// L8402
PlayerGetAlliance(lv_aIPlayer, c_allianceIdVision, lv_humanPlayer)
# mods/starcoop/starcoop.sc2mod
// L6187
PlayerGetAlliance(lv_indexPlayer, c_allianceIdVision, lv_humanPlayer)