====== Setting Alliances ======
''Reviewed For: SDK 2.1''
Player Alliances can be set on game initialization for both multiplayer and colony scenarios. For a full alliance, remember to set both players as allied to each other. See sample below.
===== Related Source Code =====
//From Player.h//
class OP2 _Player
{
public:
...
void AllyWith(int playerNum);
...
}
===== Sample Code =====
int InitProc()
{
Player[Player0].AllyWith(Player2);
Player[Player2].AllyWith(Player0);
}
----
- //Go Back to [[op2_sdk:programming_scenario_dlls|Programming a Scenario]]//\\
- //Go Back to [[op2_sdk:software_development_kit_sdk|Outpost 2 Software Development Kit]]//\\
- //Go Back to [[outpost_2:outpost_2|Outpost 2 Main page]]//\\
- //Go Back to [[http://wiki.outpost2.net/doku.php?id=start|Wiki Home Page]]//