# Set Alliance Between Two Player Groups
Grammar — Make all players in sourcePlayers treat all players in targetPlayers as alliance
Flags —Action
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 Playersplayergroup
— Target Playersint
[ preset::AllianceSetting ] — Alliance Setting
Returns — void
void libNtve_gf_SetAllianceBetweenTwoPlayerGroups(
playergroup lp_sourcePlayers,
playergroup lp_targetPlayers,
int lp_alliance,
);
# 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
# mods/starcoop/starcoop.sc2mod
// 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
// 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)