![ラッチ先生](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/2022/07/ratch_kao_yes-2-300x300.png)
今回は、「ねっち プラットフォーム!」でぇ~す!
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_are-300x300.png)
おおっ!
ゴール!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-2.png)
ねっちをタップで動かし、障害物をよけてゴールするゲーム(プラットフォーム・ゲーム)を
プログラミングします。
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ねっちプラットフォーム](https://scratchsiyou.com/wp-content/uploads/2022/09/scratchsiyoutitle1037_explanation5.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
赤い障害物が、出てくるんだね!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
そう!
コスチュームに自分の好きなように障害物を描いて、横スクロールしているんだ。
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 地面のコスチューム1](https://scratchsiyou.com/wp-content/uploads/2022/09/scratchsiyoutitle1037_explanation12.jpg)
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 地面のコスチューム2](https://scratchsiyou.com/wp-content/uploads/2022/09/scratchsiyoutitle1037_explanation13.jpg)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
赤い障害物に触れると、ゲームオーバーなんだよね!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
それが、このスクリプトです。
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ゲームオーバーのスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/09/scratchsiyoutitle1037_explanation16-800x583.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_are-300x300.png)
えっ!
たった これだけでできちゃうんだぁ。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
そう!
みんなもさっそく、作ってみよう!
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
はぁ~い!
それでは、楽しくプログラミングを学んでいきましょう!
今回作るスクラッチの作品は、これっ!
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
がんばってね!
今回のプログラミングで学ぶことは
1.横スクロールして、ゴールしたら止まるスクリプトがわかるよ
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ゴールすると横スクロールが止まる](https://scratchsiyou.com/wp-content/uploads/2022/09/scratchsiyoutitle1037_explanation17.png)
スクリプトを見てみよう
スプライトはこれです!
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch スプライト](https://scratchsiyou.com/wp-content/uploads/2022/09/scratchsiyoutitle1037_explanation18.png)
![ラッチ先生<br>](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
このスクラッチ作品のスプライトは、
- 「ねっち」
- 「地面」
- 「ねっち」「地面」は作成しました。
背景は、
- Blue Sky
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
- 「ねっち」の作り方
こちらの記事に書いてあるよ!
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
- 背景を変える方法
こちらの記事にのっています。
コスチュームはこれです!
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 地面のコスチューム1](https://scratchsiyou.com/wp-content/uploads/2022/09/scratchsiyoutitle1037_explanation12-1.jpg)
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 地面のコスチューム2](https://scratchsiyou.com/wp-content/uploads/2022/09/scratchsiyoutitle1037_explanation13-1.jpg)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
「GOAL」と文字の入れ方は、
こちらの記事に載っています。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
「ゴールの旗」は、
ペイントエディターの「直線」「塗りつぶし」を使って作成したよ!
使い方は、こちらの記事に載っています。
スクリプトはこれです!
ねっちのスクリプト
歩く
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ねっちのスクリプト1](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation35-0.png)
ジャンプ
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ねっちのスクリプト2](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation19.png)
横スクロール
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ねっちのスクリプト3](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation20-1.png)
障害物に当たる、ゴール
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ねっちのスクリプト4](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation21-1.png)
地面のスクリプト
![](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation58.png)
横スクロール
![](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation59.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
効果音は、
- 「Jump」
- 「Oops」
- 「Win」
に、しました。
- 効果音の選び方
- 「〇の音を鳴らす」の使い方
こちらの記事に書いてあるよ!
プログラミングの仕方を説明します
「地面」のコスチュームを作成
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
「地面」のコスチュームを 4枚作成します。
1.地面の「コスチューム」を作成する
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 地面のコスチュームを作成する](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation25.jpg)
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
横スクロールの説明をわかりやすくするために、
コスチューム番号をつけるね!
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 地面のコスチューム](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation31.jpg)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
「地面」は、
ペイントエディターの「四角形」を使って作成したよ!
使い方は、こちらの記事に載っています。
ジャンプを プログラミング
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
「ねっち」を ジャンプさせましょう。
2.ねっちを ジャンプさせる
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ジャンプのスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation34-1.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
ジャンプのプログラミングの解説は、
こちらの記事に載っています。
横スクロールを プログラミング
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
地面を 横スクロールさせよう!
3.ねっちの右側をタップすると、地面が動く
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 横スクロール1のスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation39-1.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_are-1-300x300.png)
あっ、地面が動いたぁ!
3.タップすると、地面が 横スクロールする(無限)
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 横スクロール1のスクリプト2](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation43.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
地面の横スクロールのプログラミングの解説は、
この記事に載っています。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
「ねっちプラットフォーム」では、横スクロールを無限にしません。
地面のコスチューム4が、x座標0になったら ゴール!
横スクロールを止めます。
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ゴール](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation52.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
ふむ、ふむ。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
「ずっと」ブロックを「○回繰り返す」ブロックに 変えます。
![scratch 「○回繰り返す」ブロック](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation56.png)
どのようにプログラムを作っていくか、動画で説明します。
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
はぁ~い!
フリーBGM:DOVA-SYNDROME 午後のカメレオンは星の波動を数え… written by Masuo
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
なるほど!
地面のコスチューム3が、x座標-465になったら止めるんだね
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
そうです!
「もし○なら、でなければ」ブロックを使って止めます。
![scratch 「もし○なら、でなけらば」ブロック](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation53.png)
4.コスチューム3が、x座標-465になったら止める
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch ゴールのスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation64-2.png)
赤い障害物、ゴールの旗を描く
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
地面のコスチュームに、
- 赤い障害物
- ゴールの旗
を、書いていきましょう。
1.各コスチュームに、赤い障害物、ゴールの旗を好きなところに描く
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 障害物、ゴールの旗を描く](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation67.jpg)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
「赤い丸の障害物」は、
ペイントエディターの「丸」を使って作成したよ!
使い方は、こちらの記事に載っています。
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
次に
実際に緑の旗をクリックして、地面を横スクロールしてみよう!
ねっちが、ゴールの旗までたどりつけるかな。
2.じっさいに、地面をスクロールして、障害物の場所を決めていこう
赤い障害物にふれたら止まるプログラミング
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2022/08/ratch_kao_dounaru-1.png)
「○まで待つ」ブロックを使って
![scratch 「○まで待つ」ブロック](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation68.png)
ねっちが 赤い障害物に当たったら動きを止めるプログラムを 作ります。
1.赤い障害物に当たったらゲームオーバー
![「スクラッチしよう!10-37 ねっちプラットフォーム#1」 scratch 赤い障害物に当たったら止めるスクリプト](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation70.jpg)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_ok-1-300x300.png)
これで、
「ねっちプラットフォーム」のプログラミング完了!
まとめ
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
今回は、
- 「もし○なら」ブロック
- 「コスチューム番号=○」ブロック
- 「○を送る」ブロック
を使って、
横スクロールを止めるプログラミングを学びました。
![](https://scratchsiyou.com/wp-content/uploads/2022/10/scratchsiyoutitle1037_explanation64-3.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/09/sukku_futu-1-300x300.png)
地面のコスチューム4が、
ゴールになるんだよね
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
このプログラミングは、
プラットフォームのゲームでよく使われるからおぼえておくといいよ!
![スック](https://scratchsiyou.com/wp-content/uploads/2022/05/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)
画面を クリックすると
「ステップアップドリル」のサイトへ 行けます!
コメント