(info) Other great resources: Official JS API docs, Scripting Forum

playerPower()

Find out how much available power a specific player has...

 

Syntax

var returnValue = playerPower([player]);

Parameters

ParameterTypeMandatoryDescriptionGame version
playerNumber(error)

The player to inspect.

Defaults to "me".

3.1 Beta 1

Return value

ValueTypeDescriptionGame version
<power>NumberA number representing the amount of power the player has.3.1 Beta 1
0NumberPower reserves are empty. Use queuedPower() to work out by how much.3.1 Beta 1
<error>ErrorThe player specified does not exist. There is no spoon.3.1 Beta 1

Notes

This function returns the amount of power in your power reserves, as indicated by the power bar shown at the bottom of the screen:

If the bar goes negative, the function returns 0. In this scenario, you can get an estimate of how much power is required for outstanding tasks by using queuedPower().

Example

How much power do I have?
var myPower = playerPower(me);
Availability 3.1 B1+

Requires:

  • Warzone 3.1 Beta 1 or above.
Contents

Jump to:

See also

Related API features: