Consider the following as an assessment question "Give the order in which the following blocks should be arranged to cause a Balloon sprite to rise from the bottom of the Stage to the top". When listing the blocks it would be nice to list them in any order however there is a problem. Currently the Editor will only allow Hat blocks to be place at the top of a stack. To allow for this situation we created a new instruction "strict" which when set to "no" will allow blocks to be placed in any order.
If you enter the following script into the editor it will generate an error on line 9 "Hat blocks have to be the first block in a script ..."
go to x (0) y (-180) ~ Block 1
separator
move (10) steps ~ Block 2
separator
point in direction (0) ~ Block 3
separator
repeat until <(y position) gt (175)> ~ Block 4
space
when flag clicked ~ Block 5
To get around that error you can provide the instruction "-- strict: no", the Editor will then allow Hat blocks to be place anywhere within a script. The updated script should be:
-- strict: no
go to x (0) y (-180) ~ Block 1
separator
move (10) steps ~ Block 2
separator
point in direction (0) ~ Block 3
separator
repeat until <(y position) gt (175)> ~ Block 4
space
when flag clicked ~ Block 5
Additionally, "-- strict: no" will also allow the "myblock" directive to the used without a corresponding "define". Again, this is useful if you are designing assessment questions that require a custom block but don't require the definition of the block to be provided.
Give the new strict instruction a try and see what you can create.
We have changed the way that blocks are displayed when marked with the "highlight" directive for the Black & White color option in an attempt to make the highlighted blocks stand out more.
Now when blocks are highlighted and the color option is Black & White, the outline of the highlighted blocked will be darkened and all other blocks, which have not been highlighted, will be dimmed, visually drawing attention to the highlighted blocks. See the example script below.
when flag clicked
pen down
go to x (-100) y (100)
highlight!repeat (4)
move (200) steps
turn right (90) degrees
pen up
Remember that the "highlight" directive can also be placed on the interior of a command to highlight different parts of it. For example try these command to see how different blocks are highlighted:
if <highlight!<key [right arrow] pressed> and <(x position) lt (190)>> then
if <<highlight!key [right arrow] pressed> and <(x position) lt (190)>> then
if <<key [highlight!right arrow] pressed> and <(x position) lt (190)>> then
Try out the new highlight for Black & White blocks and let us know what you think.
In an attempt to simplify script entry when typing scripts into the Editor we have introduced autocompletion. Type the first few characters of a block and a list of matching blocks will appear. The blocks will be sorted from most frequently to least frequently used so the most common blocks will be listed first.
Simply press Tab to accept an option. If the block selected requires fields to be completed the cursor will advance to the first empty field. You can use the key sequence "Ctrl-m" on Windows machines, or "Cmd-m" on Macs, to move to the next empty field.
The Editor now also support auto-indent and auto-outdent. The editor will automatically indent the next line when a C-block is entered and will automatically outdent when the cap blocks "delete this clone" and "stop [all]" are entered. The Editor will also automatically outdent "else" blocks.
Our benchmark tests show that these enhancements speed up the entering of scripts by up to 70%.
We've added new options to the Editor section of the Options that allow you to control whether autocompletion if enabled or not; whether to include blocks for the extensions that require a device for example Makey Makey and Microbit; to control the size of the text in the editor and to control the number of spaces used to indent a line.
All in all, we think we have accomplished our original goal of simplifying script entry. As usual any feedback is welcomed.
We have added support for Finnish. Starting in 2016 the Finnish school curriculum introduced coding as key content for all subjects. We look forward to working with our Finnish partners to bring Print Scratch to as many Finnish educators as possible.
This brings the number of supported languages to 10, the other nine being - English, French, Spanish, Spanish (Latin American), German, Dutch, Italian, Portuguese and Portuguese (Brazilian).
Due to loads of requests, the next language we will be adding support for is Arabic. However, it will require significant changes as it is will be the first RTL (Right-To-Left) language we'll be supporting. We anticipate completion in the first quarter of 2024. If you're willing to assist with the translation of the Examples page into Arabic please get in touch.