天気を変える gameplay.setWeather
ひとことで言うと
現在の天気を変更します。
ブロックとコード
現在の天気を晴れにする
ブロックの文言は公式の日本語版に合わせています(形は簡易表示です)。
gameplay.setWeather(Weather.Clear)gameplay.set_weather(CLEAR)引数(ひきすう)
引数とは、ブロックの中で自分で選んだり入力したりする部分のことです。
| 名前 | 選べる値 | 意味 |
|---|---|---|
| weather | 数値 | 目的の天気。たとえば:Weather.Clear |
使用例
Bring on a thunderstorm with just a command.
JavaScript
player.onChat("storm", function {
gameplay.setWeather(Weather.Thunder)
});Python
def on_on_chat():
gameplay.set_weather(THUNDER)
player.on_chat("storm", on_on_chat)