2016-03-26 00:47:20 +01:00
|
|
|
# Start Countdown
|
|
|
|
|
2016-06-16 02:01:18 +02:00
|
|
|
Start counting down time from the number of milliseconds you say.
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2016-06-16 02:01:18 +02:00
|
|
|
```sig
|
|
|
|
game.startCountdown(1000)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## Parameters
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
* ``ms`` is a [number](/types/number) that says how many milliseconds to count down (one second is 1000 milliseconds)
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## Examples
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2016-06-16 02:01:18 +02:00
|
|
|
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.
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2016-06-16 02:01:18 +02:00
|
|
|
```blocks
|
2022-08-10 18:36:19 +02:00
|
|
|
input.onButtonEvent(Button.A, input.buttonEventClick(), () => {
|
2016-06-16 02:01:18 +02:00
|
|
|
game.addScore(1)
|
|
|
|
})
|
|
|
|
game.startCountdown(10000)
|
2016-03-26 00:47:20 +01:00
|
|
|
```
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## See Also
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
[score](/reference/game/score), [add score](/reference/game/add-score)
|
2016-03-26 00:47:20 +01:00
|
|
|
|