# Set Alliance Between Two Player Groups

Grammar — Make all players in sourcePlayers treat all players in targetPlayers as alliance
FlagsAction

Changes alliance settings for all players in the player group. Each player applies the requested alliance setting to every other player in the player group. 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

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

Returns — void

void libNtve_gf_SetAllianceBetweenTwoPlayerGroups(
	playergroup lp_sourcePlayers,
	playergroup lp_targetPlayers,
	int lp_alliance,
);

Category: Player / Alliances

# Examples

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L12323
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(PlayerGroupSingle(lv_indexPlayer), lv_itPlayerGroup, libNtve_ge_AllianceSetting_AllyWithSharedVisionControlAndSpending)
// L12336
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(PlayerGroupSingle(lv_indexPlayer), PlayerGroupSingle(15), libNtve_ge_AllianceSetting_Neutral)
// L12337
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(PlayerGroupSingle(15), PlayerGroupSingle(lv_indexPlayer), libNtve_ge_AllianceSetting_Neutral)

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L245
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(lp_legendPlayers, lp_allyPlayers, libNtve_ge_AllianceSetting_Ally)
// L246
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(lp_allyPlayers, lp_legendPlayers, libNtve_ge_AllianceSetting_Ally)
// L247
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(lp_legendPlayers, lp_enemyPlayers, libNtve_ge_AllianceSetting_Enemy)
// L248
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(lp_enemyPlayers, lp_legendPlayers, libNtve_ge_AllianceSetting_Enemy)
// L249
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(lp_allyPlayers, lp_enemyPlayers, libNtve_ge_AllianceSetting_Enemy)
// L250
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(lp_enemyPlayers, lp_allyPlayers, libNtve_ge_AllianceSetting_Enemy)
// L251
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(lp_enemyPlayers, lv_creepgroup, libNtve_ge_AllianceSetting_Ally)
// L252
libNtve_gf_SetAllianceBetweenTwoPlayerGroups(lv_creepgroup, lp_enemyPlayers, libNtve_ge_AllianceSetting_Ally)