Diagnosis
When your script doesn't run as expected, Scratch offers some strategies for solving your problems.
Lead Image © kudryashka, 123RF.com
When your script doesn't run as expected, Scratch offers some strategies for solving your problems.
I hope that you take the Scratch code snippets provided in previous articles and expand on them or find inspiration to create your own projects. As you create, however, you will run into problems when the script you created doesn't work as expected. In this article, I share some strategies to help you diagnose problems in your script, so that you can find a solution.
In Figure 1, the script starting with the when flag clicked
block moves the sprite around a square, but when you run the script, there is no movement of the sprite.
The script is straightforward; looking at it, you just know it should work. To troubleshoot this script, start by pulling the move (50) steps
and turn 90 degrees
blocks out of the main script shown in Figure 1. Then click on the two-block script one time. Does it move? Then click a second, third, and fourth time. This mimics the original script, and it allows you to confirm that the move
and turn
blocks do actually work and advance the sprite around the stage.
[...]
Pages: 4
Price $15.99
(incl. VAT)