Find out how much available power a specific player has... |
var returnValue = playerPower([player]); |
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
player | Number | The player to inspect. Defaults to "me". | 3.1 Beta 1 |
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 |
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().
var myPower = playerPower(me); |
AvailabilityRequires:
|
ContentsJump to: |
See alsoRelated API features:
|