Other great resources: Official JS API docs, Scripting Forum

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Overview

An integer representing the power level for the current game.

In other words, this has an effect on the amount of money you have at the start of the game (as depicted by the yellow "power" bar bottom-centre of the game screen).

The order in which things are built and researched will usually be quite different depending on the starting power, so your script should act accordingly.

Values

ValueDescription
400Low power
700Medium power
1000High power levels

Examples

Switching based on power level setting
switch (powerType) {
  case 1000: {
    console("it's a high power game");
    break;
  }
  case 700: {
    console("it's a medium power game");
    break;
  }
  case 400: {
    console("it's a low power game");
    break;
  }
  default: {
    console("unrecognised power level!");
  }
}

See also

 

  • No labels