Differences

This shows you the differences between two versions of the page.

Link to this comparison view

op2_sdk:playercolor [2016/04/01 21:39]
vagabond created
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 ​in thetysGamedifferent colors are available and can be referenced through the PlayerColor enum. +Player colors can be set using the SetPlayerColor function ​from TethysGameSeven different colors are available and can be referenced through the PlayerColor enum.  
 + 
 +<code cpp> 
 + 
 +// Color of structures and units belonging to a given player 
 +enum PlayerColor 
 +
 + PlayerBlue = 0, //Standard Eden color 
 + PlayerRed, ​     //Standard Plymouth color 
 + PlayerGreen,​ 
 + PlayerYellow,​ 
 + PlayerCyan,​ 
 + PlayerMagenta,​ 
 + PlayerBlack ​    //Not selectable as a player color from the multiplayer game initialization screen 
 +}; 
 + 
 +</​code>​
  
 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:​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]]//
  • op2_sdk/playercolor.txt
  • Last modified: 2016/12/17 17:34
  • by vagabond