Blocks and code
Try itYour first script
A script can show in two ways. Code
shows it as words. Blocks
shows it as coloured blocks. It is the same script both ways.
Switch to Blocks
Press Blocks
, at the top left of the code box.
| In Code | In Blocks |
|---|---|
| The when line is at the top. | The when line is a big block. |
| The steps are pushed in under it. | The steps sit inside the big block. |
| You click a number to pick a new one. | You press - and + beside a number, or type a new one. |
Change a number in Blocks
- Find the first 4, the one beside seconds.
- Press - until it says 2.
- Press Play
. The slime walks left twice as fast. - Press Stop
. - Press Code
. The first walk line now says over 2 seconds.
You changed the block, and the words changed too. That is because there is only one script.
Which one should you use?
Use the one you like. Blocks are good when you are new, because you can not spell a word wrong. Later in the course you will type scripts, so look at Code now and then.
This section ticks itself when you press Play
.

