# Set Alliance Aspect

Grammar — Turn player inSourcePlayer inAllianceId ally towards player inTargetPlayer
FlagsNative | Action

Sets the alliance aspect of one player towards another player, but not vice-versa. This action will turn enable or disable the chosen Alliance Aspect, such as shared vision or hostility, for the Source Player towards the Target Player. Pushable means that the Target Player*“s units are allowed to push the Source Player”*s units out of the way if they are trying to path through them.

# Arguments

  • int — Source Player
  • int [ preset::AllianceAspect ] — Alliance Aspect
  • int — Target Player
  • bool [ preset::OnOffOption ] — On/Off

Returns — void

native void PlayerSetAlliance(
	int inSourcePlayer,
	int inAllianceId,
	int inTargetPlayer,
	bool ally,
);

Category: Player / Alliances

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L575
PlayerSetAlliance(gv_p1_USER, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L576
PlayerSetAlliance(gv_p2_ZERG_ORANGE_NW, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L577
PlayerSetAlliance(gv_p3_ZERG_LIGHTBLUE_SE, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L578
PlayerSetAlliance(gv_p5_ZERG_TACTICALPHASE, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L579
PlayerSetAlliance(gv_p6_ZERG_NOAIPREPLACED, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L922
PlayerSetAlliance(gv_p1_USER, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L966
PlayerSetAlliance(gv_p05_COLONIST, c_allianceIdPushable, gv_p07_ZERG_INFESTED, true)
// L967
PlayerSetAlliance(gv_p05_COLONIST, c_allianceIdPushable, gv_p03_VIROPHAGE, true)
// L353
PlayerSetAlliance(gv_p01_USER, c_allianceIdPushable, gv_p02_TYCHUS, true)
// L1945
PlayerSetAlliance(gv_p12_AUTOTURRET_ENEMY, c_allianceIdVision, gv_p01_USER, true)
// L1946
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3099
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3100
PlayerSetAlliance(gv_p12_AUTOTURRET_ENEMY, c_allianceIdVision, gv_p01_USER, true)
// L3231
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3295
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3333
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, false)
// L3334
PlayerSetAlliance(gv_p12_AUTOTURRET_ENEMY, c_allianceIdVision, gv_p01_USER, false)
// L3582
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3583
PlayerSetAlliance(gv_p12_AUTOTURRET_ENEMY, c_allianceIdVision, gv_p01_USER, true)
// L370
PlayerSetAlliance(gv_p3_RIKSVILLE_YELLOW, c_allianceIdPushable, gv_p2_DOMINION_RED, true)
// L373
PlayerSetAlliance(gv_p1_USER, c_allianceIdPushable, gv_p5_RIKSVILLE_PUSHY, true)
// L374
PlayerSetAlliance(gv_p3_RIKSVILLE_YELLOW, c_allianceIdPushable, gv_p1_USER, true)
// L406
PlayerSetAlliance(gv_pLAYER_03_COLONISTS, c_allianceIdPushable, gv_pLAYER_01_USER, true)
// L1881
PlayerSetAlliance(gv_pLAYER_04_REBELS, c_allianceIdVision, gv_pLAYER_01_USER, true)
// L341
PlayerSetAlliance(gv_p05_TOSH, c_allianceIdVision, gv_p01_USER, false)
// L997
PlayerSetAlliance(gv_p03_SIMULATOR, c_allianceIdPushable, gv_p01_USER, false)
// L563
PlayerSetAlliance(gv_p02_ZERG, c_allianceIdPushable, gv_p07_ZERG_KERRIGAN, true)
// L564
PlayerSetAlliance(gv_p05_ZERG_BASE, c_allianceIdPushable, gv_p07_ZERG_KERRIGAN, true)
// L565
PlayerSetAlliance(gv_p01_USER, c_allianceIdPushable, gv_p07_ZERG_KERRIGAN, true)
// L2420
PlayerSetAlliance(gv_p07_ZERG_KERRIGAN, c_allianceIdVision, gv_p01_USER, true)
// L2421
PlayerSetAlliance(gv_p07_ZERG_KERRIGAN, c_allianceIdVision, gv_p03_MOEBIUS, true)
// L566
PlayerSetAlliance(gv_p10_HYBRID_MANIFESTATIONS, c_allianceIdVision, gv_p1_USER, true)
// L573
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdPushable, gv_p10_HYBRID_MANIFESTATIONS, true)
// L574
PlayerSetAlliance(gv_p3_PROTOSS_ENEMY, c_allianceIdPushable, gv_p10_HYBRID_MANIFESTATIONS, true)
// L575
PlayerSetAlliance(gv_p4_PROTOSS_ENEMY, c_allianceIdPushable, gv_p10_HYBRID_MANIFESTATIONS, true)
// L576
PlayerSetAlliance(gv_p6_PROTOSS_ENEMY, c_allianceIdPushable, gv_p10_HYBRID_MANIFESTATIONS, true)
// L4039
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdVision, gv_p1_USER, true)
// L4057
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdVision, gv_p1_USER, false)
// L4125
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdVision, gv_p1_USER, true)
// L4143
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdVision, gv_p1_USER, false)
// L575
PlayerSetAlliance(gv_p1_USER, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L576
PlayerSetAlliance(gv_p2_ZERG_ORANGE_NW, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L577
PlayerSetAlliance(gv_p3_ZERG_LIGHTBLUE_SE, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L578
PlayerSetAlliance(gv_p5_ZERG_TACTICALPHASE, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L579
PlayerSetAlliance(gv_p6_ZERG_NOAIPREPLACED, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L922
PlayerSetAlliance(gv_p1_USER, c_allianceIdPushable, gv_p4_COLONISTS, true)
// L966
PlayerSetAlliance(gv_p05_COLONIST, c_allianceIdPushable, gv_p07_ZERG_INFESTED, true)
// L967
PlayerSetAlliance(gv_p05_COLONIST, c_allianceIdPushable, gv_p03_VIROPHAGE, true)
// L353
PlayerSetAlliance(gv_p01_USER, c_allianceIdPushable, gv_p02_TYCHUS, true)
// L1945
PlayerSetAlliance(gv_p12_AUTOTURRET_ENEMY, c_allianceIdVision, gv_p01_USER, true)
// L1946
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3099
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3100
PlayerSetAlliance(gv_p12_AUTOTURRET_ENEMY, c_allianceIdVision, gv_p01_USER, true)
// L3231
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3295
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3333
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, false)
// L3334
PlayerSetAlliance(gv_p12_AUTOTURRET_ENEMY, c_allianceIdVision, gv_p01_USER, false)
// L3582
PlayerSetAlliance(gv_p08_AUTOTURRET_FRIENDLY, c_allianceIdVision, gv_p01_USER, true)
// L3583
PlayerSetAlliance(gv_p12_AUTOTURRET_ENEMY, c_allianceIdVision, gv_p01_USER, true)
// L370
PlayerSetAlliance(gv_p3_RIKSVILLE_YELLOW, c_allianceIdPushable, gv_p2_DOMINION_RED, true)
// L373
PlayerSetAlliance(gv_p1_USER, c_allianceIdPushable, gv_p5_RIKSVILLE_PUSHY, true)
// L374
PlayerSetAlliance(gv_p3_RIKSVILLE_YELLOW, c_allianceIdPushable, gv_p1_USER, true)
// L406
PlayerSetAlliance(gv_pLAYER_03_COLONISTS, c_allianceIdPushable, gv_pLAYER_01_USER, true)
// L1881
PlayerSetAlliance(gv_pLAYER_04_REBELS, c_allianceIdVision, gv_pLAYER_01_USER, true)
// L341
PlayerSetAlliance(gv_p05_TOSH, c_allianceIdVision, gv_p01_USER, false)
// L997
PlayerSetAlliance(gv_p03_SIMULATOR, c_allianceIdPushable, gv_p01_USER, false)
// L563
PlayerSetAlliance(gv_p02_ZERG, c_allianceIdPushable, gv_p07_ZERG_KERRIGAN, true)
// L564
PlayerSetAlliance(gv_p05_ZERG_BASE, c_allianceIdPushable, gv_p07_ZERG_KERRIGAN, true)
// L565
PlayerSetAlliance(gv_p01_USER, c_allianceIdPushable, gv_p07_ZERG_KERRIGAN, true)
// L2420
PlayerSetAlliance(gv_p07_ZERG_KERRIGAN, c_allianceIdVision, gv_p01_USER, true)
// L2421
PlayerSetAlliance(gv_p07_ZERG_KERRIGAN, c_allianceIdVision, gv_p03_MOEBIUS, true)
// L566
PlayerSetAlliance(gv_p10_HYBRID_MANIFESTATIONS, c_allianceIdVision, gv_p1_USER, true)
// L573
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdPushable, gv_p10_HYBRID_MANIFESTATIONS, true)
// L574
PlayerSetAlliance(gv_p3_PROTOSS_ENEMY, c_allianceIdPushable, gv_p10_HYBRID_MANIFESTATIONS, true)
// L575
PlayerSetAlliance(gv_p4_PROTOSS_ENEMY, c_allianceIdPushable, gv_p10_HYBRID_MANIFESTATIONS, true)
// L576
PlayerSetAlliance(gv_p6_PROTOSS_ENEMY, c_allianceIdPushable, gv_p10_HYBRID_MANIFESTATIONS, true)
// L4039
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdVision, gv_p1_USER, true)
// L4057
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdVision, gv_p1_USER, false)
// L4125
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdVision, gv_p1_USER, true)
// L4143
PlayerSetAlliance(gv_p2_PROTOSS_STALKER, c_allianceIdVision, gv_p1_USER, false)
// L1062
PlayerSetAlliance(gv_pLAYER_01_USER, c_allianceIdVision, gv_pLAYER_03_PROTOSS, true)
// L1977
PlayerSetAlliance(gv_pLAYER_03_DOMINION_YELLOW, c_allianceIdVision, gv_pLAYER_01_USER, true)
// L778
PlayerSetAlliance(gv_PLAYER_07_DOMINION_GREEN22, c_allianceIdPushable, gv_PLAYER_01_USER, true)
// L1169
PlayerSetAlliance(gv_pLAYER_02_DOMINION2, c_allianceIdControl, gv_pLAYER_01_USER, true)
// L938
PlayerSetAlliance(gv_pLAYER_02_DOMINION2, c_allianceIdPushable, gv_pLAYER_01_USER, true)
// L939
PlayerSetAlliance(gv_pLAYER_02_DOMINION222, c_allianceIdPushable, gv_pLAYER_01_USER, true)
// L896
PlayerSetAlliance(gv_p03_ZERG_ALLY, c_allianceIdPushable, gv_p01_USER, true)
// L906
PlayerSetAlliance(gv_p03_KERRIGAN_AI, c_allianceIdPushable, gv_p01_USER, false)
// L907
PlayerSetAlliance(gv_p03_KERRIGAN_AI, c_allianceIdPushable, gv_p02_DOMINION, false)
// L908
PlayerSetAlliance(gv_p03_KERRIGAN_AI, c_allianceIdPushable, gv_p03_DOMINION, false)
// L1386
PlayerSetAlliance(gv_pLAYER_02_BRAKK, c_allianceIdVision, gv_pLAYER_01_USER, true)
// L5714
PlayerSetAlliance(gv_pLAYER_02_BRAKK, c_allianceIdVision, gv_pLAYER_01_USER, false)
// L6288
PlayerSetAlliance(gv_pLAYER_07_TALIS, c_allianceIdPushable, gv_pLAYER_01_USER, true)
// L1062
PlayerSetAlliance(gv_pLAYER_01_USER, c_allianceIdVision, gv_pLAYER_03_PROTOSS, true)
// L1977
PlayerSetAlliance(gv_pLAYER_03_DOMINION_YELLOW, c_allianceIdVision, gv_pLAYER_01_USER, true)
// L778
PlayerSetAlliance(gv_PLAYER_07_DOMINION_GREEN22, c_allianceIdPushable, gv_PLAYER_01_USER, true)
// L1169
PlayerSetAlliance(gv_pLAYER_02_DOMINION2, c_allianceIdControl, gv_pLAYER_01_USER, true)
// L938
PlayerSetAlliance(gv_pLAYER_02_DOMINION2, c_allianceIdPushable, gv_pLAYER_01_USER, true)
// L939
PlayerSetAlliance(gv_pLAYER_02_DOMINION222, c_allianceIdPushable, gv_pLAYER_01_USER, true)
// L896
PlayerSetAlliance(gv_p03_ZERG_ALLY, c_allianceIdPushable, gv_p01_USER, true)