remove Life

Decrease the number of lives remaining by some amount.


The life count in the game is decreased by the number of lives you say. If the life count reaches 0 when these lives are removed, then the game is over.


  • life: a number to remove from the count.


Take away 20 lives count if the player’s score reaches 10000 points.

let giveLives = true

if (game.score() > 9999) {
    if (giveLives) {
        giveLives = false

See also

set life, add life