Page 133 - KEC Khaitan C3 Flipbook
P. 133
To do so create the script for each sprite as given below:
When you run the project, if the condition in the if () then section is true, the blocks
inside it will execute, and the score will update on the stage. Otherwise, the blocks
in the else section will run.
DEBUGGING AND REFINING PROJECTS
Sometimes, Scratch projects don’t work as expected due to bugs or mistakes in the
script. Debugging helps fix errors, while refining improves the project's appearance
and functionality.
DEBUGGING PROJECTS
Debugging is the process of identifying and fixing mistakes (bugs) in the code. Some
of the common bugs and fixes are:
The sprite is not moving? → Check if you have added a motion block.
The event doesn't start? → Make sure the right event block is used (e.g., "When
green flag clicked").
The score is not updating? → Check if the variable block is connected properly.
REFINING PROJECTS
Refining a Scratch project means enhancing its appearance, functionality, and
performance. It includes fixing errors, adding new features, smoothing movements,
and improving the overall user experience. To refine a Scratch project, do the
following:
Check for Errors (Debugging): Run the project and identify any issues.
Interactive Story 131

