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

Version 1 Next »

Find out how much power is still needed to start current production and research orders...

 

Syntax

var power = queuedPower(player);

Parameters

ParameterTypeMandatoryDescriptionGame version
playerNumber(tick)

The player to inspect.

3.2

Return value

ValueTypeDescriptionGame version
<power>NumberA number representing the amount of power the player needs before all current production and research tasks can start.3.2
<error>ErrorThe player specified does not exist. There is no spoon.3.2

Example

Do I have power in my power reserves?
var powerRequired = queuedPower(me);
 
if (!powerRequired) {
	// I have power in my power reserves
} else {
	// My power reserves are empty and tasks are stalling waiting for power
}
Availability 3.1 B1+

Requires:

  • Warzone 3.1 Beta 1 or above.
Contents

Jump to:

See also

Related API features:

 

  • No labels