Find out how much available power a specific player has...
Syntax
var returnValue = playerPower([player]);
Parameters
Parameter
Type
Mandatory
Description
Game version
player
Number
The player to inspect.
Defaults to "me".
3.1 Beta 1
Return value
Value
Type
Description
Game version
<power>
Number
A number representing the amount of power the player has.
3.1 Beta 1
0
Number
Power reserves are empty. Use queuedPower() to work out by how much.
3.1 Beta 1
<error>
Error
The 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:
queuedPower() – work out how much power is needed before power reserves start filling up again