![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
こんにちは!
「スクラッチしよう!楽しく学ぶプログラミング教室」の担任ラッチです。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
スックだよ!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
今回は、「かくれんぼするよ」というゲームを作ります。
ネコが、姿を消して5回場所を変えます。
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch ネコが姿を隠して5回場所を変える](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation3.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
あらっ、すばやいねえ!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
かくれたネコをクリックできたら、あなたの勝ち!
できなかったら、あなたの負け!
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch 「かくれんぼするよ!」ゲームの判定](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation6.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
おもしろそう!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
このゲームは、ネコの隠れる数を5回と決めました。
そのプログラミングは、これです。
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch ネコが姿を消して5回場所を変えるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation8.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
あっ、「5回繰り返す」ブロックを使ってるね。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
そうです!
今回は、
・「〇回繰り返す」ブロック
![scratch 「〇回繰り返す」ブロック](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation9.png)
を使って、
ネコが5回隠れる「かくれんぼするよ!」ゲームをプログラミングしていきましょう。
それでは、楽しくプログラミングを学んでいきましょう!
今回作るスクラッチの作品は、これっ!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
ここのポイントを直すには、もう少しプログラミングを学ぶ必要があるんだ。
また、今度の機会にやります。お楽しみにね。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
はぁーーい!
今回のプログラミングで学ぶことは
1.ネコが姿を隠して、5回場所を移すスクリプトがわかるよ
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch ネコが姿を消して5回場所を変える](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation3-1.png)
2.隠れたネコをクリックすると、姿を現すスクリプトがわかるよ。
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch 隠れたネコをクリックすると現れる](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation10.png)
3.クリックすると動きを止め 「見つかっちゃった」と言うスクリプトがわかるよ
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch クリックするとネコが動きを止めしゃべる](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation11.png)
4.5回場所を変えたら、動きを止め姿を現し「ざんねんでした」と言うスクリプトがわかるよ
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch ネコが5回移動したら動きを止め姿を現す](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation12.png)
スクリプトを見てみよう
スプライトはこれです!
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch スプライト](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation13.png)
![ラッチ先生<br>](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
このスクラッチ作品のスプライトは、
- 「ネコ」
です。
- 「スプライト1」を「ネコ」にしました。
スクリプトはこれです!
ネコのスクリプト
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch ネコのスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation14.png)
プログラミングの仕方を説明します
ネコのスクリプト
姿を隠して 5回場所を変えるプログラミング
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch ネコが姿を隠して5回場所を変えるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation15.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/03/sukku_question-1-300x300.png)
あれっ、
幽霊の効果が 99になってるよ?
![ラッチ先生<br>](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
スック、いいところに気がつきましたね!
次のプログラミングの所で説明するね。
かくれたネコをクリックすると 姿を現すプログラミング
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch クリックするとネコが現れるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation17.png)
![ラッチ先生<br>](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
ここで、幽霊の効果を99にした理由を説明するね。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/03/sukku_futu-1-300x300.png)
はぁーーい!
![ラッチ先生<br>](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
ここで、幽霊の効果を99にした理由を説明するね。
![scratch 「幽霊の効果を〇にする」ブロック](https://scratchsiyou.com/wp-content/uploads/2024/01/scratchsiyoutitle0502_explanation24.png)
- スプライトの姿を透明にする。
![scratch 「幽霊の効果を〇にする」ブロックの役目](https://scratchsiyou.com/wp-content/uploads/2021/12/scratchsiyoutitle0204_explanation12.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/03/sukku_futu-1-300x300.png)
下の記事で、
「幽霊の効果」ブロックの使い方が、くわしくの学べるよ。
![ラッチ先生<br>](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
幽霊の効果が100だと、クリックしても反応しないんだ。
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch 幽霊の効果99と100の反応の比較](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation20.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/03/sukku_futu-1-300x300.png)
いくらクリックしても、ネコの姿が現れないね。
![ラッチ先生<br>](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
だから、
スプライトを透明にして、クリックで反応させるために
幽霊の効果を99にしたんだ。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/03/sukku_futu-1-300x300.png)
なるほどね!
クリックすると 動きを止めしゃべる プログラミング
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch ネコをクリックすると動きを止めてしゃべるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation21.png)
5回移動したら 姿を現ししゃべるプログラミング
![「スクラッチしよう!5-2 かくれんぼするよ!」scratch ネコが姿を現ししゃべるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation22.png)
まとめ
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
今回は、
「〇回繰り返す」ブロックを使って、
ネコが5回隠れる「かくれんぼするよ!」ゲームのプログラミングを学びました。
![scratch 「〇回繰り返す」ブロック](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation9-1.png)
- 中に入っているブロックを、〇回繰り返す
![scratch 「〇回繰り返す」ブロックの役目](https://scratchsiyou.com/wp-content/uploads/2022/03/scratchsiyoutitle0502_explanation15-1.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/03/sukku_futu-1-300x300.png)
ネコが場所を変える回数は、
このブロックの数字を変えるんだね!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
そうです。
みんなも、自分の好きな回数に変えてみよう!
![スック](https://scratchsiyou.com/wp-content/uploads/2022/03/sukku_futu-1-300x300.png)
ぼく、10000回にしよっ!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
アハハ!
今回の「かくれんぼするよ!」ゲームは、どうでしたか。
これからも簡単に作れるゲームを紹介していくから、楽しみにしててね!
それじゃあ、また!
![スック](https://scratchsiyou.com/wp-content/uploads/2021/12/sukku_futu-300x300.png)
まったねえーーー!
(@^^)/~~~
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
「○回繰り返す」ブロックを 使って
![](https://scratchsiyou.com/wp-content/uploads/2022/11/scratchsiyoutitle0502_explanation23.png)
簡単なゲーム「かくれんぼNo.2」のプログラミングに 挑戦してみよう!
![スック](https://scratchsiyou.com/wp-content/uploads/2022/05/sukku_futu-1-300x300.png)
カニをクリックで消して、ネコを見つけるゲームだよ!
動画を 見てみてね。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
このゲーム「かくれんぼNo.2」のプログラミングは、
こちらの記事に 載っています。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/05/sukku_futu-1-300x300.png)
つくってみよう!
ステップアップドリル
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
「変数」って、なあに?
「変数」ブロックって、どう使うの?
と 思っている方に!
変数ブロックでのプログラミングを 学べるドリルを 作りました
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
「リスト」って、なあに?
「リスト」ブロックって、どう使うの?
と 思っている方はこちら!
リストブロックでのプログラミングを 学べるドリルを 作りました
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
画面を クリックすると
「ステップアップドリル」のサイトへ 行けます!
コメント