難易度を変える gameplay.setDifficulty
ひとことで言うと
ゲームの難易度を変更します。
ブロックとコード
ゲームの難易度をPEACEFULに変更する
ブロックの文言は公式の日本語版に合わせています(形は簡易表示です)。
gameplay.setDifficulty(PEACEFUL)gameplay.set_difficulty(PEACEFUL)引数(ひきすう)
引数とは、ブロックの中で自分で選んだり入力したりする部分のことです。
| 名前 | 選べる値 | 意味 |
|---|---|---|
| difficulty | GameDifficulty | 新しい難易度 |
使用例
Change it to normal, or even hard for a greater challenge!
JavaScript
player.onChat("creeper", function () {
gameplay.setDifficulty(EASY)
mobs.spawn(mobs.monster(CREEPER), pos(0, 0, 0))
})Python
def on_on_chat():
gameplay.set_difficulty(EASY)
mobs.spawn(mobs.monster(CREEPER), pos(0, 0, 0))
player.on_chat("creeper", on_on_chat)