Differences
This shows you the differences between two versions of the page.
| op2_sdk:playercolor [2016/04/01 21:39] – created vagabond | op2_sdk:playercolor [2016/12/17 17:34] (current) – vagabond | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Player Color ====== | ====== Player Color ====== | ||
| - | Player colors can be set using the SetPlayerColor function | + | Player colors can be set using the SetPlayerColor function |
| + | |||
| + | <code cpp> | ||
| + | |||
| + | // Color of structures and units belonging to a given player | ||
| + | enum PlayerColor | ||
| + | { | ||
| + | PlayerBlue = 0, //Standard Eden color | ||
| + | PlayerRed, | ||
| + | PlayerGreen, | ||
| + | PlayerYellow, | ||
| + | PlayerCyan, | ||
| + | PlayerMagenta, | ||
| + | PlayerBlack | ||
| + | }; | ||
| + | |||
| + | </ | ||
| Black is not typically used. For single player scenarios, Eden is typically blue and Plymouth is typically red. | Black is not typically used. For single player scenarios, Eden is typically blue and Plymouth is typically red. | ||
| - | ===== Sample Code ===== | + | When Outpost 2 auto-sets an AI color in a multiplayer game, AIs take the first color that isn't taken by a human player in this order: blue, red, green, yellow, cyan, magenta, black. |
| + | ---- | ||
| + | - //Go Back to [[op2_sdk: | ||
| + | - //Go Back to [[op2_sdk: | ||
| + | - //Go Back to [[outpost_2: | ||
| + | - //Go Back to [[http:// | ||