pxt-calliope/docs/reference/game/start-countdown.md
Juri Wolf 5f7a8e5301
Updates for V4 (#197)
* update yotta defaults for 16kb devices

* refactor deprecated blocks

* updates for button events

* update button events

* update refference

* update docs

* update docs

* update button event blocks

* update docs

* update block id
2022-08-10 09:36:19 -07:00

30 lines
618 B
Markdown

# Start Countdown
Start counting down time from the number of milliseconds you say.
```sig
game.startCountdown(1000)
```
## Parameters
* ``ms`` is a [number](/types/number) that says 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.onButtonEvent(Button.A, input.buttonEventClick(), () => {
game.addScore(1)
})
game.startCountdown(10000)
```
## See Also
[score](/reference/game/score), [add score](/reference/game/add-score)