SC2Mapster.com Wiki

SC2 API / Functions / PlayerDifficulty

PlayerDifficulty

int PlayerDifficulty(int player);

Difficulty of the player

Note: As of Beta 4, it is always returning 0 wether it is AI or Player.

Parameters

int player

Player to check

Return value

int - Difficulty of the player set in the game lobby. Can be one of:

  • 0 (c_skirVeryEasy): Very Easy
  • 1 (c_skirEasy): Easy
  • 2 (c_skirMedium): Medium
  • 3 (c_skirHard): Hard
  • 4 (c_skirVeryHard): Very Hard
  • 5 (c_skirCheater): Cheater

Examples

Example
// A map with different players and AI
int difficulty;

difficulty = PlayerRace(1); // 0 : Very Easy AI
difficulty = PlayerRace(2); // 1 : Easy AI
difficulty = PlayerRace(3); // 4 : Very Hard AI
difficulty = PlayerRace(4); // 3 : Hard AI
// Need to test what a player returns

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Mar 11, 2010
Last updated
Mar 13, 2010

Author