![ラッチ先生](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)
前回の「ねっち ジャンプゲーム#1」では、
- ハートが 空にただよう
- ギガが 歩き続ける
プログラミングをしました。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/05/sukku_futu-2-300x300.png)
おもしろいよ。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
今回は、この「ねっち ジャンプゲーム#1」に
- 「ハート」を4個ゲットしたら、「クリア」
- 「ギガ」に当たると、「ゲームオーバー」
プログラムを追加していきます。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/05/sukku_futu-1-300x300.png)
まだ「ねっち ジャンプゲーム#1」の
- ハートが 空にただよう
- ギガが 歩き続ける
プログラミングをしてない人は、
こちらの記事を見てね!
それでは、楽しくプログラミングを学んでいきましょう!
今回作るスクラッチの作品は、これっ!
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
「クリア」してみてね!
今回のプログラミングで学ぶことは
3. 4個のハートをとると、クリアするスクリプトがわかるよ
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch 4個のハートをとるとクリア](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation11.png)
4.ギガに当たると、ゲームオーバーするスクリプトがわかるよ
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch ギガに当たるとゲームオーバー](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation13-1.png)
追加プログラミングの仕方を 説明します
ハートのスクリプト
4個のハートをゲットしたら クリアするプログラミング
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/04/ratch_kao_dounaru-1.png)
ねっちが4個のハートをゲットしたか わかるように
「たいよう」のコスチュームが 5個あります。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/08/sukku_futu-300x300.png)
うん、うん。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/04/ratch_kao_dounaru-1.png)
クリアのプログラミングを わかりやすくするために
「たいよう」のコスチュームに番号を入れましょう。
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch 「たいよう」のコスチューム](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation32.png)
1. 場所を 決める
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch 「たいよう」を表示するスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation39.png)
2.ねっちに ジャンプしてゲットされると 消える
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch ねっちにゲットされると消えるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation50.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/08/sukku_futu-300x300.png)
うん、うん。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/04/ratch_kao_dounaru-1.png)
ねっちがハートをゲットしたら、
「○を送る」ブロックを使って、
![scratch 「○を送る」ブロック](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation51.png)
「たいよう」のコスチュームを 次に変えます。
3.ゲットされるごと 「たいよう」のコスチュームを 変える
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch 「たいよう」のコスチュームを変えるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation54-1.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/05/sukku_futu-2-300x300.png)
「〇を送る」ブロックの
![scratch 「○を送る」ブロック](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation51-1.png)
- 使い方
- 作り方
を、知りたい人は、こちらの記事に書いてあります
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/04/ratch_kao_dounaru-1.png)
「たいよう」のコスチュームが5になったら、背景「おめでとう」を表示する
![](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation55.png)
プログラムを作ります。
4,「たいよう」のコスチュームが5になったら、背景「おめでとう!」にする。
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch 「おめでとう!」を表示するスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation58.png)
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/04/ratch_kao_dounaru-1.png)
「クリアを送る」ブロックで、
![](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation67.png)
ゲームをクリアした合図を送って、
- ねっち
- ギガ
の動きのプログラムを 作ろう
5.ねっちが 「ナイス!」と言う
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch ねっちが「ナイス!」と言うスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation71.png)
6.ギガの動きを 止める
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch ギガの動きを止めるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation73.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/08/sukku_futu-300x300.png)
これで、
ゲームのクリアが できたね!
ギガのスクリプト
ギガに当たると ゲームオーバーになるプログラミング
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/04/ratch_kao_dounaru-1.png)
「スプライトの他のスクリプトを 止める」ブロックで、
![](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchsiyoutitle1027_explanation102.png)
ねっちに当たったら、ギガの動きを止めるプログラムを作ろう
1.ねっちに当たったら、歩きを止める
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch ギガの歩きを止めるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation91.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
「スプライトの他のスクリプトを止める」ブロック
- 出し方
- 使い方
こちらの記事に書いてあるよ!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/04/ratch_kao_dounaru-1.png)
「背景を○する」ブロックで、
![](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation92.png)
「ざんねんでした!」を表示しよう!
2.「ざんねんでした!」を 表示する
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch 「ざんねんでした!」を表示するスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation95.png)
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/04/ratch_kao_dounaru-1.png)
「アウトを送る」ブロックで、
![](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation96.png)
ゲームをゲームオーバーした合図を送って、
- ねっち
の動きを止めるプログラムを 作ろう
3.ねっちの動きを 止める
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch ねっちの動きを止めるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation99.jpg)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/08/sukku_ok-300x300.png)
これで、
「ねっち ジャンプゲーム」の完成だぁ!
まとめ
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
今回は、
ハートをゲットするたびに、
「たいよう」のコスチュームを次のコスチュームにするプログラムに
- 「もし○なら」ブロック
- 「コスチューム番号=5」ブロック
- 「背景を○にする」ブロック
- 「○を送る」ブロック
を使って、
ゲームを「クリア」するプログラミング を学びました。
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch 「おめでとう!」を表示するスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation58-2.png)
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch クリアするスクリプト1](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation71-3.png)
![「スクラッチしよう!10-27 ねっち ジャンプゲーム!」 scratch クリアするスクリプト2](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation73-1.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/07/sukku_futu-300x300.png)
「○を送る」ブロックって、
![scratch 「○を送る」ブロック](https://scratchsiyou.com/wp-content/uploads/2022/08/scratchsiyoutitle1027_explanation67-1.png)
ほかのスプライトのプログラムを始めたり、止めたりする
大事なブロックだね。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
そうですね!
「○を送る」ブロックが 使えるようになると、
プログラミングが もっと楽しくなっていくよ!
![スック](https://scratchsiyou.com/wp-content/uploads/2022/08/sukku_ok-300x300.png)
わかった!
プログラムの中に、どんどん使ってみるよ!
![ラッチ先生](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/2021/12/ratch_kao_dounaru.png)
「リスト」って、なあに?
「リスト」ブロックって、どう使うの?
と 思っている方はこちら!
リストブロックでのプログラミングを 学べるドリルを 作りました
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
画面を クリックすると
「ステップアップドリル」のサイトへ 行けます!
コメント