pxt-calliope/docs/reference/game/start-countdown.md
2016-06-15 17:01:18 -07:00

30 lines
610 B
Markdown

# Start Countdown
Start counting down time from the number of milliseconds you say.
```sig
game.startCountdown(1000)
```
### Parameters
* a [number](/reference/types/number) that means how many milliseconds to count down (one second is 1000 milliseconds)
### Examples
This program is a simple game.
Press button ``A`` as much as possible.
At the end of 10 seconds, the program will show your score.
```blocks
input.onButtonPressed(Button.A, () => {
game.addScore(1)
})
game.startCountdown(10000)
```
### See Also
[score](/reference/game/score), [change score by](/reference/game/change-score-by)