# Set Alliance

Grammar — Make player sourcePlayer and player targetPlayer treat each other as alliance
FlagsAction

Sets alliance settings between two players. This action will determined how two players treat each other, such as whether or not their units fight. Pushable means that one player*“s units are allowed to push another player”*s units out of the way if they are trying to path through them.

# Arguments

  • int — Source Player
  • int — Target Player
  • int [ preset::AllianceSetting ] — Alliance Setting

Returns — void

void libNtve_gf_SetAlliance(
	int lp_sourcePlayer,
	int lp_targetPlayer,
	int lp_alliance,
);

Category: Player / Alliances

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L184
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_ALLY, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L185
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER2, libNtve_ge_AllianceSetting_Enemy)
// L186
libNtve_gf_SetAlliance(gv_pLAYER_COMPUTER1, gv_pLAYER_COMPUTER2, libNtve_ge_AllianceSetting_Ally)
// L509
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER2, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L510
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER2, libNtve_ge_AllianceSetting_Enemy)
// L511
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_BOARD, libNtve_ge_AllianceSetting_Enemy)
// L512
libNtve_gf_SetAlliance(gv_pLAYER_COMPUTER1, gv_pLAYER_COMPUTER2, libNtve_ge_AllianceSetting_Ally)
// L513
libNtve_gf_SetAlliance(gv_pLAYER_COMPUTER1, gv_pLAYER_BOARD, libNtve_ge_AllianceSetting_Ally)
// L1594
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L1595
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER2, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L1613
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_Enemy)
// L1614
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER2, libNtve_ge_AllianceSetting_Enemy)
// L212
libNtve_gf_SetAlliance(gv_pLAYER_COMPUTER1, 0, libNtve_ge_AllianceSetting_Enemy)
// L273
libNtve_gf_SetAlliance(gv_pLAYER_COMPUTER1, gv_pLAYER_COMPUTER2, libNtve_ge_AllianceSetting_Ally)
// L274
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER2, libNtve_ge_AllianceSetting_Enemy)
// L692
libNtve_gf_SetAlliance(gv_pLAYER_COMPUTER1, 0, libNtve_ge_AllianceSetting_Neutral)
// L211
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_ENEMY, libNtve_ge_AllianceSetting_Enemy)
// L331
libNtve_gf_SetAlliance(gv_p2_ENEMY_ZERG, gv_p3_ENEMY_PROTOSS, 1)
// L473
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_BOARD, libNtve_ge_AllianceSetting_EnemyWithSharedVision)
// L474
libNtve_gf_SetAlliance(gv_pLAYER_COMPUTER1, gv_pLAYER_BOARD, libNtve_ge_AllianceSetting_Ally)
// L942
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L993
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L1003
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_Enemy)
// L1014
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L1023
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_Enemy)
// L1035
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L1044
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_Enemy)
// L1104
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L519
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_BOARD, 6)
// L520
libNtve_gf_SetAlliance(gv_pLAYER_COMPUTER1, gv_pLAYER_BOARD, 0)
// L1007
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, 1)
// L1071
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, 5)
// L1082
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, 1)
// L1091
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, 5)
// L1102
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, 1)
// L1111
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, 5)
// L1175
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, 1)
// L1241
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, 5)
// L183
libNtve_gf_SetAlliance(gv_pLAYER_USER, gv_pLAYER_COMPUTER1, libNtve_ge_AllianceSetting_Enemy)
// L560
libNtve_gf_SetAlliance(gv_p1_USER, gv_p2_ZERG_ORANGE_NW, libNtve_ge_AllianceSetting_Enemy)
// L561
libNtve_gf_SetAlliance(gv_p1_USER, gv_p3_ZERG_LIGHTBLUE_SE, libNtve_ge_AllianceSetting_Enemy)
// L562
libNtve_gf_SetAlliance(gv_p1_USER, gv_p4_COLONISTS, libNtve_ge_AllianceSetting_Ally)
// L563
libNtve_gf_SetAlliance(gv_p1_USER, gv_p5_ZERG_TACTICALPHASE, libNtve_ge_AllianceSetting_Enemy)
// L564
libNtve_gf_SetAlliance(gv_p1_USER, gv_p6_ZERG_NOAIPREPLACED, libNtve_ge_AllianceSetting_Enemy)
// L565
libNtve_gf_SetAlliance(gv_p2_ZERG_ORANGE_NW, gv_p3_ZERG_LIGHTBLUE_SE, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable)
// L566
libNtve_gf_SetAlliance(gv_p2_ZERG_ORANGE_NW, gv_p4_COLONISTS, libNtve_ge_AllianceSetting_Enemy)
// L567
libNtve_gf_SetAlliance(gv_p2_ZERG_ORANGE_NW, gv_p5_ZERG_TACTICALPHASE, libNtve_ge_AllianceSetting_NeutralWithSharedVisionAndPushable)
// L568
libNtve_gf_SetAlliance(gv_p2_ZERG_ORANGE_NW, gv_p6_ZERG_NOAIPREPLACED, libNtve_ge_AllianceSetting_NeutralWithSharedVisionAndPushable)
// L569
libNtve_gf_SetAlliance(gv_p3_ZERG_LIGHTBLUE_SE, gv_p4_COLONISTS, libNtve_ge_AllianceSetting_Enemy)
// L534
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_02_REFUGEES, libNtve_ge_AllianceSetting_Neutral)
// L535
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_03_INFESTED_REFUGEES, libNtve_ge_AllianceSetting_Enemy)
// L536
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_04_INFESTEDREFUGEES, libNtve_ge_AllianceSetting_Enemy)
// L537
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_05_REFUGEES, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable)
// L538
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_06_INFESTORS, libNtve_ge_AllianceSetting_Enemy)
// L539
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_08_SWANN, libNtve_ge_AllianceSetting_Ally)
// L540
libNtve_gf_SetAlliance(gv_pLAYER_02_REFUGEES, gv_pLAYER_05_REFUGEES, libNtve_ge_AllianceSetting_Neutral)
// L541
libNtve_gf_SetAlliance(gv_pLAYER_02_REFUGEES, gv_pLAYER_06_INFESTORS, libNtve_ge_AllianceSetting_NeutralWithSharedVision)
// L542
libNtve_gf_SetAlliance(gv_pLAYER_02_REFUGEES, gv_pLAYER_08_SWANN, libNtve_ge_AllianceSetting_Neutral)
// L543
libNtve_gf_SetAlliance(gv_pLAYER_03_INFESTED_REFUGEES, gv_pLAYER_02_REFUGEES, libNtve_ge_AllianceSetting_NeutralWithSharedVision)
// L501
libNtve_gf_SetAlliance(gv_pLAYER01_USER, gv_pLAYER02_PROTOSS, libNtve_ge_AllianceSetting_Enemy)
// L502
libNtve_gf_SetAlliance(gv_pLAYER01_USER, gv_pLAYER03_COLONIST, libNtve_ge_AllianceSetting_Ally)
// L503
libNtve_gf_SetAlliance(gv_pLAYER01_USER, gv_pLAYER04_PURIFIER, libNtve_ge_AllianceSetting_Enemy)
// L504
libNtve_gf_SetAlliance(gv_pLAYER01_USER, gv_pLAYER05_COLONISTSTRUCTURES, libNtve_ge_AllianceSetting_Neutral)
// L505
libNtve_gf_SetAlliance(gv_pLAYER01_USER, gv_pLAYER06_TERRORFLEET, libNtve_ge_AllianceSetting_Enemy)
// L506
libNtve_gf_SetAlliance(gv_pLAYER01_USER, gv_pLAYER07_RESOURCES, libNtve_ge_AllianceSetting_Neutral)
// L507
libNtve_gf_SetAlliance(gv_pLAYER02_PROTOSS, gv_pLAYER04_PURIFIER, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable)
// L508
libNtve_gf_SetAlliance(gv_pLAYER02_PROTOSS, gv_pLAYER03_COLONIST, libNtve_ge_AllianceSetting_Neutral)
// L509
libNtve_gf_SetAlliance(gv_pLAYER02_PROTOSS, gv_pLAYER05_COLONISTSTRUCTURES, libNtve_ge_AllianceSetting_Neutral)
// L510
libNtve_gf_SetAlliance(gv_pLAYER02_PROTOSS, gv_pLAYER06_TERRORFLEET, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable)
// L947
libNtve_gf_SetAlliance(gv_p01_USER, gv_p02_ZERG_EAST, libNtve_ge_AllianceSetting_Enemy)
// L948
libNtve_gf_SetAlliance(gv_p01_USER, gv_p03_VIROPHAGE, libNtve_ge_AllianceSetting_Enemy)
// L949
libNtve_gf_SetAlliance(gv_p01_USER, gv_p04_ZERG_NORTH, libNtve_ge_AllianceSetting_Enemy)
// L950
libNtve_gf_SetAlliance(gv_p01_USER, gv_p05_COLONIST, libNtve_ge_AllianceSetting_Neutral)
// L951
libNtve_gf_SetAlliance(gv_p01_USER, gv_p06_COLONIST, libNtve_ge_AllianceSetting_Neutral)
// L952
libNtve_gf_SetAlliance(gv_p01_USER, gv_p07_ZERG_INFESTED, libNtve_ge_AllianceSetting_Enemy)
// L953
libNtve_gf_SetAlliance(gv_p01_USER, gv_p08_ZERG_SOUTH, libNtve_ge_AllianceSetting_Enemy)
// L954
libNtve_gf_SetAlliance(gv_p05_COLONIST, gv_p06_COLONIST, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable)
// L961
libNtve_gf_SetAlliance(gv_p05_COLONIST, gv_p02_ZERG_EAST, libNtve_ge_AllianceSetting_Neutral)
// L962
libNtve_gf_SetAlliance(gv_p05_COLONIST, gv_p03_VIROPHAGE, libNtve_ge_AllianceSetting_Neutral)
// L669
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_02_DOMINION, libNtve_ge_AllianceSetting_Enemy)
// L670
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_03_DOMINION, libNtve_ge_AllianceSetting_Enemy)
// L671
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_04_DOMINION, libNtve_ge_AllianceSetting_Enemy)
// L672
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_06_TRAIN, libNtve_ge_AllianceSetting_Enemy)
// L673
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_05_ABANDONEDVEHICLES, libNtve_ge_AllianceSetting_Neutral)
// L674
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_07_DEFILERBONESAMPLE, libNtve_ge_AllianceSetting_Neutral)
// L675
libNtve_gf_SetAlliance(gv_pLAYER_02_DOMINION, gv_pLAYER_03_DOMINION, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable)
// L676
libNtve_gf_SetAlliance(gv_pLAYER_02_DOMINION, gv_pLAYER_04_DOMINION, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable)
// L677
libNtve_gf_SetAlliance(gv_pLAYER_02_DOMINION, gv_pLAYER_06_TRAIN, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable)
// L678
libNtve_gf_SetAlliance(gv_pLAYER_02_DOMINION, gv_pLAYER_05_ABANDONEDVEHICLES, libNtve_ge_AllianceSetting_Neutral)
// L457
libNtve_gf_SetAlliance(gv_p01_USER, gv_p02_ORLAN_ENEMY, libNtve_ge_AllianceSetting_Enemy)
// L458
libNtve_gf_SetAlliance(gv_p01_USER, gv_p03_MIRA_HAN, libNtve_ge_AllianceSetting_Neutral)
// L459
libNtve_gf_SetAlliance(gv_p01_USER, gv_p04_DOMINION, libNtve_ge_AllianceSetting_Enemy)
// L460
libNtve_gf_SetAlliance(gv_p01_USER, gv_p05_SCRAP, libNtve_ge_AllianceSetting_Neutral)
// L461
libNtve_gf_SetAlliance(gv_p01_USER, gv_p06_JUNKERS, libNtve_ge_AllianceSetting_Neutral)
// L462
libNtve_gf_SetAlliance(gv_p01_USER, gv_p07_DERELICT_STRUCTURES, libNtve_ge_AllianceSetting_Neutral)
// L463
libNtve_gf_SetAlliance(gv_p01_USER, gv_p08_RAYNOR_COMP, libNtve_ge_AllianceSetting_AllyWithSharedVision)
// L464
libNtve_gf_SetAlliance(gv_p01_USER, gv_p09_PROTOSS_RELICS, libNtve_ge_AllianceSetting_Neutral)
// L465
libNtve_gf_SetAlliance(gv_p02_ORLAN_ENEMY, gv_p03_MIRA_HAN, libNtve_ge_AllianceSetting_Neutral)
// L466
libNtve_gf_SetAlliance(gv_p02_ORLAN_ENEMY, gv_p04_DOMINION, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable)
// L351
libNtve_gf_SetAlliance(gv_p01_USER, gv_p02_TYCHUS, libNtve_ge_AllianceSetting_AllyWithSharedVision)