life

Get the game player’s life count.

life
JavaScript
function info.life(): number;
Python
def info.life(): number

Your program has a life counter which you can set to record the number of lives remaining for a player in your game.

Returns

  • a number that is the current life count.

Example

Give the player a bonus of 1000 points if they reach 9 lives.

Single player

truelife8‏>giveBonus1000falsesetgiveBonustochange score byifthenifthensetgiveBonustoon start

Multiplayer

trueplayer2life8‏>giveBonus1000falsesetgiveBonustochangeplayer2score byifthenifthensetgiveBonustoon start

See also

set life, change life by