![ラッチ先生](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)
今回の「ステップアップドリル」で作る作品は、こちら!
![「スクラッチしよう!8-1-07 ステップアップドリル:ねっちコロコロ!No.2」 scratch](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-gif2-2.gif)
![スック](https://scratchsiyou.com/wp-content/uploads/2022/01/sukku_futu-300x300.png)
コースが 横に 動いていくね
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
コースが 横スクロールしていきます。
ローカル変数「番号」「x座標」ブロックが 使われているんだ
![変数ブロック](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation1.png)
![変数表示](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation3.png)
![新しい変数](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation5.png)
![変数ブロック](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation2.png)
![変数表示](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation4.png)
![新しい変数](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation6.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2024/01/sukku_futu-300x300.png)
あっ!
プラットフォーマーだね
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
そう!自分で 描いたコースが 横スクロールするプログラムです
ローカル変数が どのように使われているか 学んでいこう
![スック](https://scratchsiyou.com/wp-content/uploads/2023/09/sukku_ok-300x300.png)
O.K!
今回作るスクラッチの作品は、これっ!
![スック](https://scratchsiyou.com/wp-content/uploads/2023/07/sukku_futu-1-300x300.png)
コースは 自分で 作成できるよ
今回のプログラミングで 学ぶことは
1.画面を タップすると ねっちボールが ジャンプする スクリプトが わかるよ
2.コースが 横スクロールする スクリプトが わかるよ
3.ゲームクリア・ゲームオーバーの スクリプトが わかるよ
![「スクラッチしよう!8-1-07 ステップアップドリル:ねっちコロコロ!No.2」 scratch ゲームオーバー・クリア](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation9-800x583.png)
プログラミングの仕方を説明します
ねっちボールが ジャンプするプログラミング
1.画面を タップすると ねっちボールが ジャンプする スクリプトが わかるよ
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
最初に、スプライト「ねっちボール」を 作っていこう
![「スクラッチしよう!8-1-07 ステップアップドリル:ねっちコロコロ!No.2」 scratch スプライト・背景](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation10-1.png)
![スック](https://scratchsiyou.com/wp-content/uploads/2023/07/sukku_futu-1-300x300.png)
スプライト「ねっちボール」の 作り方は
この動画を 見てね
フリーBGM:DOVA-SYNDROME 午後のカメレオンは星の波動を数え… written by Masuo
![スック](https://scratchsiyou.com/wp-content/uploads/2023/07/sukku_futu-1-300x300.png)
この動画では、大きさが「50」なっていましたが、
この「ねっちコロコロNo.2」では、
大きさを「80」に してね!
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
次に、スプライト「コース」を 作っていきます
![「スクラッチしよう!8-1-07 ステップアップドリル:ねっちコロコロ!No.2」 scratch コースのコスチューム](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation21.jpg)
フリーBGM:DOVA-SYNDROME 午後のカメレオンは星の波動を数え… written by Masuo
![スック](https://scratchsiyou.com/wp-content/uploads/2023/07/sukku_futu-1-300x300.png)
ステージの背景に、「Blue sky」を 選んだよ
![scratch 「Blue Sky」](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation22.png)
![](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation23.png)
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
それでは、まず
スプライト「ねっちボール」から
![「スクラッチしよう!8-1-07 ステップアップドリル:ねっちコロコロ!No.2」 scratch スプライト「ねっちボール」](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation25.png)
プログラミングしていきましょう
「x座標を○、y座標を○にする」ブロックを使って
![「x座標を○、y座標を○にする」ブロック](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation26-1.png)
スタートの場所を 決めます。
1.ねっちボールの場所を 決める
![「スクラッチしよう!8-1-07 ステップアップドリル:ねっちコロコロ!No.2」 scratch ねっちボールの場所を決めるスクリプト](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation29-800x583.png)
![ラッチ先生](https://scratchsiyou.com/wp-content/uploads/2021/12/ratch_kao_dounaru.png)
次は、
「変数」ブロックを使って ジャンプのプログラムを 作りましょう
![](https://scratchsiyou.com/wp-content/uploads/2024/02/scratchdrillocal07-explanation30-6.png)
コメント